title: How to refer to Typescript enum in d.ts file, when using AMD?
body: <p>I want to define a typescript interface to represent, say, an error.  Something like this:</p>
  
  <pre><code>enum MessageLevel {
      Unknown,
      Fatal,
      Critical,
      Error,
      Warning,
      Info,
      Debug
  }
  
  interface IMyMessage {
      name: string;
      level: MessageLevel;
      message: string;
  }
  </code></pre>
  
  <p>This works fine as far as it goes.  However, now (perhaps) I want to declare that interface in a .d.ts file so others can use it for typing.  But I don't want to define the enum in the .d.ts file, since that would be implementation and not simple typing information.  The enum should presumably be in a .ts file, let's call it messageLevel.ts:</p>
  
  <pre><code>///&lt;amd-module name='MessageLevel'/&gt;
  
  export enum MessageLevel {
      Unknown,
      Fatal,
      Critical,
      Error,
      Warning,
      Info,
      Debug
  }
  </code></pre>
  
  <p>and I can, at this point, use it in my d.ts typing file this way:</p>
  
  <pre><code>import * as ml from "./MessageLevel";
  
  interface IMyMessage {
      name: string;
      level: ml.MessageLevel;
      message: string;
  }
  </code></pre>
  
  <p>and I can make this work, but I don't like the level-mixing of importing an implementation file into a typing file.  Nor do I like the idea of actually implementing an enum in a typings file.</p>
  
  <p>Is there a clean way to do this that keeps implementation and declaration strictly separate?</p>