Cannot find namespace error : <p>I have the following setup:</p>

<pre><code>// enums.ts
export enum DocumentType {
  Email = 0,
  Unknown = 1
}
</code></pre>

<p>-</p>

<pre><code>// remote.ts
/// &lt;reference path="./remote.d.ts" /&gt;
import enums = require('./enums');

class Remote implements test.IRemote {
  public docType: enums.DocumentType;

  constructor() {
    this.docType = enums.DocumentType.Unknown;
  }
}

export = Remote;
</code></pre>

<p>-</p>

<pre><code>// remote.d.ts
import * as enums from './enums';


declare module test {
  export interface IRemote { 
    docType: enums.DocumentType;
  } 
}
</code></pre>

<p>But when I run tsc over this I get <code>Cannot find namespace 'test'</code> from remotes.ts. What am I missing?</p>

<p>Other information that might be useful: I've recently upgraded from Typescript 1.5 to Typescript 1.8 and replaced the use of const enums with plain enums as in the example. </p>
