title: How to require a specific string in TypeScript interface
body: <p>I'm creating a TypeScript definition file for a 3rd party js library. One of the methods allows for an options object, and one of the properties of the options object accepts a string from the list: <code>"collapse"</code>, <code>"expand"</code>, <code>"end-expand"</code>, and <code>"none"</code>.</p>
  
  <p>I have an interface for the options object:</p>
  
  <pre><code>interface IOptions {
    indent_size?: number;
    indent_char?: string;
    brace_style?: // "collapse" | "expand" | "end-expand" | "none"
  }
  </code></pre>
  
  <p>Can the interface enforce this, so if you include an <code>IOptions</code> object with the <code>brace_style</code> property, it will only allow a string that is in the acceptable list?</p>