IssueRaiser

“Type instantiation is excessively deep and possibly infinite” but only in a large codebase

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with the latest published version. It may have already been fixed. For npm: `typescript@next` This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly --> **TypeScript Version:** 3.7.2, 3.8.0-dev.20191102 (worked in 3.6) <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - Type instantiation is excessively deep and possibly infinite.ts(2589) - Mapped types - Generics - Conditional types **Code** Note: **this issue manifests itself only in our codebase**. When you run the same code in TypeScript Playground, it seems to be working fine. The snippet is hardly minimal, but I reduced it as much as I could. I recorded [a video](https://streamable.com/pjkrk) where exactly the same code yields an error different than the one in TypeScript Playground. I tried with two versions of TypeScript: `3.7.2` and `3.8.0-dev.201

Posted by karol-majewski on Nov 6, 2019, 12:06 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.3,500 issues0 comments

github (Software)

“Type instantiation is excessively deep and possibly infinite” but only in a large codebase

karol-majewskiNov 6, 2019, 12:06 AM

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with the latest published version. It may have already been fixed. For npm: `typescript@next` This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly --> **TypeScript Version:** 3.7.2, 3.8.0-dev.20191102 (worked in 3.6) <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** - Type instantiation is excessively deep and possibly infinite.ts(2589) - Mapped types - Generics - Conditional types **Code** Note: **this issue manifests itself only in our codebase**. When you run the same code in TypeScript Playground, it seems to be working fine. The snippet is hardly minimal, but I reduced it as much as I could. I recorded [a video](https://streamable.com/pjkrk) where exactly the same code yields an error different than the one in TypeScript Playground. I tried with two versions of TypeScript: `3.7.2` and `3.8.0-dev.201

Comments (0)

No comments yet. Start the discussion.

Comment on this issue