rhys-vdw / ts-auto-guard

Generate type guard functions from TypeScript interfaces
MIT License
501 stars 55 forks source link

RangeError: Maximum call stack size exceeded #233

Open ChristianRaoulis opened 1 year ago

ChristianRaoulis commented 1 year ago

I used ts-auto-guard to generate type guards for my api response types but it seems like the type guards cause typescript to crash.

More details here: https://github.com/vercel/next.js/discussions/49851

I there a way to workaround that?

rhys-vdw commented 1 year ago

It looks like it's an upstream error, so I don't know fi there's much we can do about it here.

Hey @Skyriis do you know which type is causing the crash? If so you can remove the ts-auto-guard:type-guard comment so that it's not processed.

rhys-vdw commented 1 year ago

It looks like https://github.com/microsoft/TypeScript/issues/53783 is already closed, so perhaps it can be fixed by updating TypeScript?

You could try updating the dependencies in this package and see if the problem goes away. If so, open a PR with the updates.

ChristianRaoulis commented 1 year ago

Hey @Skyriis do you know which type is causing the crash? If so you can remove the ts-auto-guard:type-guard comment so that it's not processed.

Yeah i'll probably do that.

You could try updating the dependencies in this package and see if the problem goes away. If so, open a PR with the updates.

Updating the dependencies hasn't helped