Upgrade to 2.X results in many "TS2589: Type instantiation is excessively deep and possibly infinite." errors
See original GitHub issueWe upgraded recently our typescript project from 1.6.11 to 2.1.2. Since then we have many Typescript errors: “TS2589: Type instantiation is excessively deep and possibly infinite.”
These errors mainly occur in place where we call. await object.$query().update({...})
or await Class.query().select('*', knex.raw('....'))
I guess this has somewhat to do with the new types introduced in version 2. In general the functionality seems to work as before. So we are just ignoring this specific error. Maybe this issue is somehow related to: https://github.com/microsoft/TypeScript/issues/34933?
We use Typescript: 3.7.5
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (2 by maintainers)
Top Results From Across the Web
Type instantiation is excessively deep and possibly infinite ...
(2589) . In this simplified code it takes 6 nodes to hit that limit, however, in my actual code, it hits it already...
Read more >Documentation - TypeScript 4.5
When you upgrade TypeScript, you're also forced to handle changes to TypeScript's ... error: Type instantiation is excessively deep and possibly infinite.
Read more >Announcing TypeScript 4.5 - Microsoft Developer Blogs
Unpack<U> : T; // error: Type instantiation is excessively deep and possibly infinite. type Test = Unpack<InfiniteBox<number>>.
Read more >TypeScript. Type instantiation is excessively deep and ...
Not always I know how to manage them. One of the messages is: Type instantiation is excessively deep and possibly infinite.ts(2589). Visual Studio...
Read more >Announcing TypeScript 4.7 : r/typescript - Reddit
It looks like the toughest upgrade though, I'm getting a lot of Type instantiation is excessively deep and possibly infinite errors.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@petrdsvoboda I wouldn’t be so sure. This issue was just closed less than a week ago on the TypeScript side. Read the last two comments.
I believe this is now fixed. Please open a new issue if not.