microsoft / TypeScript

TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
https://www.typescriptlang.org
Apache License 2.0
101.08k stars 12.49k forks source link

Regression from 4.1.5 to 4.2.3: "Type instantiation is excessively deep and possibly infinite." #43337

Open rickwebiii opened 3 years ago

rickwebiii commented 3 years ago

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

⏯ 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

albohlabs commented 3 years ago

The problem still exist with 4.4