title: ES6 * Typescript : Cannot find namespace
body: <p>Node7.4.0 / ES6 / Typescript 2.1.5 / WebStorm 2016.3</p>
  
  <p>On the line :
      <strong>export default heroRoutes.router;</strong></p>
  
  <p>I get:  <strong>TS2503 Cannot find namespace 'heroRoutes'</strong>
  after creating it and init()
  what could be wrong with it ?</p>
  
  <p>thanks for feedback</p>
  
  <blockquote>
    <p>HeroRouter.ts</p>
  </blockquote>
  
  <pre><code>import {Router, Request, Response, NextFunction} from 'express';
  const Heroes = require('../data');
  
  export class HeroRouter {
      router: Router;
  
      /**
       * Initialize the HeroRouter
       */
      constructor() {
          this.router = Router();
          this.init();
      }
  
      /**
       * GET all Heroes.
       */
      public  getAll(req: Request, res: Response, next: NextFunction) {
          res.send(Heroes);
      }
  
      /**
       * GET one hero by id
       */
      public getOne(req: Request, res: Response, next: NextFunction) {
          let query = parseInt(req.params.id);
          let hero = Heroes.find(hero =&gt; hero.id === query);
          if (hero) {
              res.status(200)
                  .send({
                      message: 'Success',
                      status: res.status,
                      hero
                  });
          }
          else {
              res.status(404)
                  .send({
                      message: 'No hero found with the given id.',
                      status: res.status
                  });
          }
      }
  
      /**
       * Take each handler, and attach to one of the Express.Router's
       * endpoints.
       */
      init() {
          this.router.get('/', this.getAll);
          this.router.get('/:id', this.getOne);
      }
  
  }
  
  // Create the HeroRouter, and export its configured Express.Router
  let heroRoutes = new HeroRouter();
  heroRoutes.init();
  
  export default heroRoutes.router;
  </code></pre>