title: Exporting like "module.exports" in TS
body: <p>I am writing a Yeoman generator and when I do it in JS like so:</p>
  
  <pre><code>"use strict";
  var Generator = require("yeoman-generator");
  var chalk = rquire("chalk");
  module.exports = class extends Generator {
    initializing() {
      this.log(
        chalk.bold(
          "Welcome to the " + chalk.green("TypeScript for Serverless") + " generator!"
        )
      );
  };
  </code></pre>
  
  <p>all is good. But I figured I could do this in TypeScript like so:</p>
  
  <pre><code>import Base = require("yeoman-generator");
  import chalk from "chalk";
  type IFileConfiguration = IComplexFileConfiguration | string;
  
  export class Generator extends Base {
    public options: IDictionary;
    public initializing() {
      this.log(
        chalk.bold(
          "Welcome to the " + chalk.green("TypeScript for Serverless") + " generator!"
        )
      );
   }
  </code></pre>
  
  <p>My <code>tsconfig.json</code> is:</p>
  
  <pre><code>{
    "compilerOptions": {
      "declaration": true,
      "module": "commonjs",
      "lib": ["es2015", "es2016", "es2017", "esnext.asynciterable"],
      "target": "es2015",
      "moduleResolution": "node",
      "sourceMap": false,
      "noImplicitAny": true,
      "outDir": "./generators/app",
      "removeComments": true,
      "experimentalDecorators": false,
      "emitDecoratorMetadata": false
    },
    "include": ["src/**/*"],
    "exclude": ["node_modules", "**/*-spec.ts"]
  }
  </code></pre>
  
  <p>But this creates a different module definition and one that completely breaks the Yeoman interface expectation. Is there a way for me to get the transpiled JS into the same export format as listed above?</p>