title: Using Promise with async/await
body: <p>I'm starting with async/await things in TypeScript and I have few questions about it. I wrote this function to get ArrayBuffer from Blob.</p>
  
  <pre><code>async function readAsArrayBuffer(blob: Blob): Promise&lt;ArrayBuffer&gt; {
      return new Promise&lt;ArrayBuffer&gt;((resolve, reject) =&gt; {
          let reader = new FileReader();
          reader.addEventListener('load', e =&gt; resolve((&lt;FileReader&gt;e.target).result));
          reader.addEventListener('error', e =&gt; reject((&lt;FileReader&gt;e.target).error));
          reader.readAsArrayBuffer(blob);
      });
  }
  </code></pre>
  
  <p>So...</p>
  
  <ol>
  <li>Do I really need <code>async</code> keyword before this function? I think, it does nothing...</li>
  <li>Should I create new FileReader in Promise executor function scope or at readAsArrayBuffer scope level? (...or it doesn't matter?)</li>
  <li>What I wrote is two functions nested in function nested in function. Am I doing something wrong? :-)</li>
  </ol>