microsoft / microsoft/TypeScript
Regression from 4.1.5 to 4.2.3: "Type instantiation is excessively deep and possibly infinite."
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 132
Description
Bug Report
The attached playground compiles happily and quickly in Typescript 4.1.5, but fails with "Type instantiation is excessively deep and possibly infinite" in Typescript 4.2.3. Is a conditional distributing that didn't use to?
🔎 Search Terms
🕗 Version & Regression Information
- This changed between versions 4.1.5 and 4.2.3
- Fails on nightly as well
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
4.2.3: Compilation error
nightly: Compilation error
🙂 Expected behavior
4.1.5: Compiles quickly and works fine
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked TypeScript Playground repro and compare compilation under 4.1.5, 4.2.3, and nightly. Reduce the example to identify the conditional-type or instantiation behavior that changed; use the reduced case to guide investigation in the compiler and add a regression test. Done means the repro compiles successfully without the excessively deep instantiation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100