title: TypeScript type that matches any object but not arrays
body: <p>I'm trying to define a type that matches any object/dictionary but NOT arrays. </p>
  
  <p>My first attempt didn't work since arrays are technically objects under the hood:</p>
  
  <pre><code>const a:{[k:string]: any} = []; // works fine
  </code></pre>
  
  <p>I also know that it's possible to create a generic "checker" like so: </p>
  
  <pre><code>type NoArray&lt;T&gt; = T extends any[] ? never : T;
  </code></pre>
  
  <p>But that's not what I'm looking for. I want a non-generic type that works like this:</p>
  
  <pre><code>const a: NoArrayType = {}; // works fine
  const a: NoArrayType = []; // TypeError
  </code></pre>