Interface for associative object array in TypeScript
<p>I have an object like so:</p>

<pre><code>var obj = {
    key1: "apple",
    key2: true,
    key3: 123,
    .
    .
    .
    key{n}: ...
}
</code></pre>

<p>So <code>obj</code> can contain any number of named keys, but the values must all be either string, bool, or number.</p>

<p>How do I declare the type of <code>obj</code> as an interface in TypeScript? Can I declare an associative array (or variadic tuple) of a union type or something similar?</p>