title: How can I fetch wasm file in TypeScript
body: <p>I just read <a href="https://developer.mozilla.org/en-US/docs/WebAssembly/Using_the_JavaScript_API" rel="nofollow noreferrer">this</a> about fetching WebAssembly file using JavaScript </p>
  
  <pre><code>WebAssembly.instantiateStreaming(fetch('simple.wasm'), importObject)
  .then(obj =&gt; obj.instance.exports.exported_func());
  </code></pre>
  
  <p>and</p>
  
  <pre><code>fetch('simple.wasm').then(response =&gt;
    response.arrayBuffer()
  ).then(bytes =&gt;
    WebAssembly.instantiate(bytes, importObject)
  ).then(results =&gt; {
    results.instance.exports.exported_func();
  });
  </code></pre>
  
  <p>Is there an equivalent way to do so in <a href="https://www.typescriptlang.org/index.html" rel="nofollow noreferrer">TypeScript</a></p>