title: Recursive Generics in TypeScript
body: <p>I want to declare a simple type to replace <code>any</code> in a piece of code. I know it will be some object-ish argument, so I could use <code>Record&lt;string, unknown&gt;</code>, but I'd rather be a <em>little</em> more specific.</p>
  <p>This would be ideal:</p>
  <pre><code>type MyObject = Record&lt;string, string | string[] | number | boolean | MyObject&gt;
  </code></pre>
  <p>but it gives the error</p>
  <blockquote>
  <p>Type alias 'MyObject' circularly references itself.ts(2456)</p>
  </blockquote>
  <p>I can get around this by cheating with interfaces:</p>
  <pre><code>type MyObject&lt;T&gt; = Record&lt;string, string | string[] | number | boolean | T&gt;
  
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
  interface IMyObject extends MyObject&lt;IMyObject&gt;{}
  </code></pre>
  <p>Is there a way to do what I want, or should I just stick to <code>Record&lt;string, unknown&gt;</code>?</p>