<!-- 🚨 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 `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.4.5 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** <pre><code>git clone <a href='https://gist.github.com/b1ddd0b8c68889622794804931c222cd.git'>https://gist.github.com/b1ddd0b8c68889622794804931c222cd.git</a> tmpdir</code> cd tmpdir sh test.sh</pre> **Expected behavior:** It should work without error **Actual behavior:** ``` ERROR: Type instantiation is excessively deep and possibly infinite ``` **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> **Related Issues:** https://github.com/microsoft/TypeScript/issues/30188#issuecomment-484499108