title: Why `await` a function is not an error in Typescript?
body: <p>It's useless to await a function, which does not even invoke it. But it would not generate a compile time error or runtime error. I can't figure out in what cases anyone would await a function.<br>
  In the following code, <code>foo</code> will not be executed. Why doesn't Typescript ban it?</p>
  
  <pre><code>async function foo(){
      console.log("foo");
  }
  async function bar(){
      //correct usage should be:   await foo();
      await foo;
  }
  bar();
  
  
  //generated es6 code.
  function foo() {
      return __awaiter(this, void 0, void 0, function* () {
      });
  }
  function bar() {
      return __awaiter(this, void 0, void 0, function* () {
          yield foo;
      });
  }
  bar();
  </code></pre>