title: typescript restrict count of object's properties
body: <p>Is it possible to restrict the count of object properties, say I want to restrict object have only one string propery (with any name), I can do:</p>
  <pre><code>{[index: string]: any}
  </code></pre>
  <p>to restrict the type of property, but can one restrict also the count of properties?</p>