title: TypeScript 3.7 recursive type references - Record vs index signature
body: <p>I tried to use recursive type references introduced in TypeScript 3.7 in a very similar fashion to what was presented in <a href="https://www.typescriptlang.org/play#example/recursive-type-references" rel="nofollow noreferrer">the official example</a>.</p>
  <p>I made something slightly different than what was presented in the docs, but thought it should work in the same manner. It turns out it does not.</p>
  <p>Using index signature in the recursion works as described in the documentation:</p>
  <pre><code>type Json = string | number | boolean | null | Json[] | { [key: string]: Json; };
  </code></pre>
  <p>However using <code>Record</code> type does not work - results in circular reference error</p>
  <pre><code>type Json = string | number | boolean | null | Json[] | Record&lt;string, Json&gt;;
  </code></pre>
  <p>And what is even more weird for me, manually expanding the <code>Record</code> type does work ok:</p>
  <pre><code>type Json = string | number | boolean | null | Json[] | { [key in string]: Json; };
  </code></pre>
  <p><a href="https://www.typescriptlang.org/play?#code/PTAEHcHsCcGsGcCwAoALgTwA4FNQCl5IA7ANQEsBDASSIBNsAPUAXlHlWjKIHNQAfUEQCuAWwBG2aP1BjIkADbYKRacPnzpBYuWp1GAbQC60gN6h9sbOgBcbDl26HbW0pRr0GAblABfTyhQQUFpIbHhBSFQIGFgAOniUDBx8QlcKACVsAGMYWhY7Th5VUQkpAVkFJRUBNQ0BFx1MnOhaI2km3IAedkLuABoU7UoOloA+f2RAsAAhISjUAAsycJCw6LgAfi3ErFwGygAFeGwhEJG81h6HYvFJaQrFZWL1TVSdI5Oz7Ny2gTMLKygLgFBxOQZpD6nSDnbx+IA" rel="nofollow noreferrer">TS playground link</a></p>
  <p>Questions:
  What is the difference between <code>{ [key: string]: X; }</code> and <code>Record&lt;string, X&gt;</code> that makes the difference with recursive types?
  Isn't <code>Record&lt;K, V&gt;</code> equivalent to <code>{ [P in K]: V; }</code> i.e. <code>Record&lt;string, X&gt; === { [key in string]: X; }</code>? Why does it produce different results with recursive types?
  What am I missing? Or is this a bug within TS?</p>