title: __awaiter is not defined when using async/await in Typescript
body: <p>I have the following code snippet in Typescript:</p>
  
  <pre><code>nsp.on('connection', async function (socket) {
      await this.emitInitialPackage(nsp, currentLine, currentCell);
  }
  
  emitInitialPackage(nsp: any, name: string, cell: any) {
      return db.Line.find({
          where: {
              name: name,
              CellId: cell
          }
      }).then(results =&gt; {
          nsp.emit('value', results);
      }).catch(err =&gt; console.log(err));
  }
  </code></pre>
  
  <p>However, when this is compiled (v2.2.1) and run, I get the following error:</p>
  
  <blockquote>
    <p>Uncaught ReferenceError: __awaiter is not defined</p>
  </blockquote>
  
  <p>What does this mean and how do I get the expected functionality?</p>
  
  <h1>Update:</h1>
  
  <pre><code>{
    "compilerOptions": {
      "target": "es5",
      "module": "commonjs",
      "moduleResolution": "node",
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "allowSyntheticDefaultImports": true,
      "sourceMap": true,
      "noEmitHelpers": true,
      "strictNullChecks": false,
      "lib": [
        "dom",
        "es2015.promise", 
        "es5"
      ],
      "types": [
        "node", 
        "express"
      ]
    },
    "exclude": [
      "node_modules",
      "dist"
    ]
  }
  </code></pre>