Type instantiation is excessively deep and possibly infinite [repro provided]
See original GitHub issueIssue Description
Unless you cast the generic Bubble
in TypeScript, it will fail with:
error TS2589: Type instantiation is excessively deep and possibly infinite.
Steps to Reproduce / Code Snippets
git clone https://github.com/jamonholmgren/BubbleGenericError.git
- npm or yarn
- Run
tsc -p .
- Observe type error
Expected Results
At the least, expected a better error message. But there’s possibly something wrong with either the included types, or TypeScript itself.
Additional Information
- Nodejs version: 13.5.0
- React version: 16.13.0
- React Native version: 0.61.5
- react-native-gifted-chat version: 0.13.0
- Platform(s) (iOS, Android, or both?): both
- TypeScript version: 3.8.2
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:7
Top Results From Across the Web
Type instantiation is excessively deep and possibly infinite.ts ...
Prerequisites I have written a descriptive issue title Mongoose version 6.5.2 Node.js version 14.18.3 MongoDB version 4.4 Operating system ...
Read more >Type instantiation is excessively deep and possibly infinite
When you write a deeply recursive conditional type where you intend the recursion to descend more than a few dozen levels, you might...
Read more >Jamon on Twitter: "I can't not brag about this — I solved a ...
An unintuitive error (“Type instantiation is excessively deep and possibly infinite”). Fixed by casting the type (IMessage) to the generic “ ...
Read more >Type instantiation is excessively deep and possibly infinite ...
Getting `Type instantiation is excessively deep and possibly infinite` errors whenever I pass MongoClient as a parameter in my code after ...
Read more >TypeScript. Type instantiation is excessively deep ... - Ilya Zykin
Type instantiation is excessively deep and possibly infinite. How to fix. I've just started a migration to TypeScript. I see many unknown and...
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 FreeTop 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
Top GitHub Comments
return <Bubble<IMessage> ... />
That helpsI ain’t got no warning 😕