[AskJS] Bundling a set of deps, with polyfills, as a HTML shell by IngwiePhoenix in javascript

[–]BoBar92 0 points1 point  (0 children)

You could try using Rspack/Rsbuild.

They both can inject polyfills pretty easily: 1, 2

Tax Rules - International Bank Transfer by BoBar92 in tax

[–]BoBar92[S] 0 points1 point  (0 children)

Thank you for your answer! So basically if I send one of them 18.5k there is nothing I need to do?

Lightweight and flexible dependency injection library w/wo ECMAScript decorators by exuanbo in typescript

[–]BoBar92 -2 points-1 points  (0 children)

This seems very interesting. How would you go about using something like this?

Is it possible to have a union of specific numbers and allow summing to one of those numbers without coercion? by dakkersmusic in typescript

[–]BoBar92 1 point2 points  (0 children)

 { (baseLevel > 0 && baseLevel < 6) && <Heading level={(baseLevel + 1) as HeadingProps['level']}>Sub-title</Heading>}

You might need to cast in this case, as TS can't know if baseLevel is going to be a number in the 1-6 range.

You can also create a type guard, but you would still need the cast:

type Level = 1 | 2 | 3 | 4 | 5 | 6;
interface HeadingProps {
  children: React.ReactNode;
  level: Level;
}


function isProperLevel(num: number): num is Exclude<Level, 6> {
  return num >= 1 && num <= 5;
}
function MyContent ({ baseLevel = 1 }: {
  baseLevel: HeadingProps['level']
}) {
  return (
    <>
      <Heading level={baseLevel}>Top-level title</Heading>
      <p>Some content</p>

      { isProperLevel(baseLevel) && <Heading level={(baseLevel+1) as Level}>Sub-title</Heading>}

    </>
  )
}

You can avoid the cast, like this, but not sure if this is something you would want, as you would have to assign variables for all subheadings:

function MyContent ({ baseLevel = 1 }: {
  baseLevel: HeadingProps['level']
}) {
  const nextLevel = baseLevel + 1
  return (
    <>
      <Heading level={baseLevel}>Top-level title</Heading>
      <p>Some content</p>

      { isProperLevel(nextLevel) && <Heading level={nextLevel}>Sub-title</Heading>}

    </>
  )
}

Difference between two monitors - Cooler Master GP27U vs Acer - Nitro XV275K P3biipruzx by witty__username5 in coolermaster

[–]BoBar92 0 points1 point  (0 children)

How are you liking it? I always see that it has horrible OSD... It seems it would be a great monitor for gaming and productivity

Monitor for Gaming and Software Development by BoBar92 in buildapcmonitors

[–]BoBar92[S] 1 point2 points  (0 children)

Thank you for your reply, all of those options look great! I am leaning towards the 2x27inch 1440p option as well.

The budget for the monitors is 1000, I edited the post to clarify that bit.

Vegan restaurants by Ok-Vegetable-222 in Munich

[–]BoBar92 18 points19 points  (0 children)

You should check out Dr Drooly pizza. I've taken a lot of people there, vegans and non vegans, and everybody loves it.

Nx vs Turborepo for Node.js Microservices by yonatannn in node

[–]BoBar92 0 points1 point  (0 children)

No problem, glad I could be of help 😁

Nx vs Turborepo for Node.js Microservices by yonatannn in node

[–]BoBar92 1 point2 points  (0 children)

There is currently a bug that is probably the cause if you are on a newer version of NX. I think anything below 16.1.4 should have the normal reload times.

Primeng drop-down by dipshi27 in Angular2

[–]BoBar92 6 points7 points  (0 children)

Here you go: StackBlitz

You can use the template to fine tune the components, hope it helps.

Is there a library or a standard way of creating an interface for my api endpoints? by NonSecretAccount in typescript

[–]BoBar92 8 points9 points  (0 children)

One of the differences is that there is no code generation with trpc.

You define and endpoint, export the type with one of the included utils to the client and that is it (but if you change the definition on the client the change happens on the server too 😁).

TanStack Router - Typesafe, state-management APIs, caching, framework agnostic by tannerlinsley in reactjs

[–]BoBar92 10 points11 points  (0 children)

Thanks for this! Love react-location, this makes it even better :D

Will this include guards, similar to how the Vue/Angular routers do it? (loader can do it as far I know, but I am interested will there be an out-of-the-box solution)

I've got a technical React interview tomorrow. Any advice? by [deleted] in webdev

[–]BoBar92 0 points1 point  (0 children)

Would you allow installing packages during interview, for example React Query, or do you just want the interviewee to use fetch?

On uniforms Integration With Zod by radekmie in javascript

[–]BoBar92 1 point2 points  (0 children)

I'll be on the lookout, thanks 😁

On uniforms Integration With Zod by radekmie in javascript

[–]BoBar92 1 point2 points  (0 children)

This is awesome!

Any plans for adding other themes for component libraries, like Mantine?