question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Type instantiation is excessively deep and possibly infinite [repro provided]

See original GitHub issue

Issue 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

  1. git clone https://github.com/jamonholmgren/BubbleGenericError.git
  2. npm or yarn
  3. Run tsc -p .
  4. 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:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:7

github_iconTop GitHub Comments

22reactions
OskarJuszczykcommented, Mar 14, 2020

return <Bubble<IMessage> ... /> That helps

1reaction
OskarJuszczykcommented, Mar 15, 2020

But then there’s a prettier warning about a missing ‘>’

I ain’t got no warning 😕

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found