title: TypeScript variable name as interface type?
body: <p>I have a piece of TypeScript code that I'm having trouble to understand. I am fairly new to TypeScript.</p>
  
  <pre><code>export const TerminalWidgetOptions = Symbol("TerminalWidgetOptions");
  export interface TerminalWidgetOptions {
      endpoint: Endpoint.Options,
      id: string,
      caption: string,
      label: string
      destroyTermOnClose: boolean
  }
  </code></pre>
  
  <p>Could someone tell me what exactly happens in the above code? What I do understand is that an interface of the name <code>TerminalWidgetOptions</code> is created and it forces the parameters <code>endpoint</code>, <code>id</code>, <code>caption</code>, <code>label</code> and <code>destroyTermOnClose</code> upon implementation into a class. I though don't quite understand the above line. So, apparently a constant is created, that can only be set once and then stays that way, right? But how can this constant have the same name as the interface type? The assignment of <code>Symbol("TerminalWidgetOptions");</code> is clear. What comes from the Symbol function is put into the constant.</p>
  
  <p>Is that more or less correct?</p>