title: Typescript can't find modules
body: <p>I have an exported module in one file(upload.ts) in Typescript that I'm not able to import into another file(application.ts) without an error. Also, I'm not able to import ExpressJS.</p>
  
  <p>Here's Upload.ts</p>
  
  <pre><code>/// &lt;reference path="Main.d.ts" /&gt;
  
  var fs = require('fs');
  var path = require('path');
  var formidable = require('formidable');
  
  export class Upload{
  
      public parse(req, res, next) {
         ...
      }
  
      public save(req, res, next) {
         ...
      }
  
      public respond(req, res, next) {
         ...
      }
  
      public errors(err, req, res, next) {
         ...
      }
  };
  </code></pre>
  
  <p>Here's application.ts</p>
  
  <pre><code>/// &lt;reference path="Main.d.ts" /&gt;
  
  var http = require("http");
  import express = require("express");
  import upload = require("Upload");
  var upload = new upload.Upload();
  
  var app = express.express();
  var HOST = "localhost";
  var PORT = 8080;
  
  app.use(express.logger());
  app.use(app.router);
  </code></pre>
  
  <p>The <code>var app = express.express();</code> code throws an error: Unresolved function or method express. I've imported express.d.ts from <a href="https://github.com/borisyankov/DefinitelyTyped/tree/master/express" rel="nofollow">https://github.com/borisyankov/DefinitelyTyped/tree/master/express</a></p>
  
  <p>Here's the error:</p>
  
  <pre><code>module.js:340
      throw err;
            ^
  Error: Cannot find module 'upload'
      at Function.Module._resolveFilename (module.js:338:15)
      at Function.Module._load (module.js:280:25)
      at Module.require (module.js:364:17)
      at require (module.js:380:17)
      at Object.&lt;anonymous&gt; (C:\Users\Me\WebstormProjects\untitled\server\main.js:12:14)
      at Module._compile (module.js:456:26)
      at Object.Module._extensions..js (module.js:474:10)
      at Module.load (module.js:356:32)
      at Function.Module._load (module.js:312:12)
      at Function.Module.runMain (module.js:497:10)
  </code></pre>
  
  <p>Here's the header file, that references to both:</p>
  
  <pre><code>/// &lt;reference path="upload.ts" /&gt;
  /// &lt;reference path="node.d.ts" /&gt;
  /// &lt;reference path="application.ts" /&gt;
  /// &lt;reference path="express.d.ts" /&gt;
  </code></pre>