Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS 4.5: Type instantiation is excessively deep and possibly infinite. #119

Closed
SimenB opened this issue Nov 18, 2021 · 2 comments
Closed

Comments

@SimenB
Copy link

SimenB commented Nov 18, 2021

Tried upgrading to [email protected], and started getting this error.

Just import '@sinclair/typebox'; is enough, but I put together a repl.it as well

https://replit.com/@SimenB/TypeScritp45Typebox

image

@sinclairzx81
Copy link
Owner

sinclairzx81 commented Nov 18, 2021

@SimenB Hi, thanks for reporting the issue. Seems like TypeBox is tripping on TypeScript 4.5 heuristics (these compiler heuristics often change from revision to revision). I've taken a quick look at the issue, and decided to pull out Function and Constructor parameter inference for the time being as a quick fix. This should resolve this deep instantiation error.

Updates published on @sinclair/[email protected]

Cheers
S

@SimenB
Copy link
Author

SimenB commented Nov 18, 2021

Works great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants