title: TypeScript: This expression is not callable. No constituent of type 'ExportValue' is callable. WebAssembly module
body: <p>I got this problem when I run this code in index.ts with Deno.</p>
  <pre><code>const wasm = await Deno.readFile(&quot;./wasm_test/pkg/wasm_test_bg.wasm&quot;);
  const wasmModule = new WebAssembly.Module(wasm);
  const wasmInstance = new WebAssembly.Instance(wasmModule);
  const wasmTest = wasmInstance.exports;
  wasmTest.sum(1, 3); // Error
  </code></pre>
  <blockquote>
  <p>Error: This expression is not callable. No constituent of type 'ExportValue' is callable.</p>
  </blockquote>
  <p>I get and error when calling <code>sum</code>,  it should give me a 4 as a result.
  When I run it as index.js it works perfectly.
  I used wasm-pack to compile the Rust code.</p>