summaryrefslogtreecommitdiff
path: root/cli/dts/lib.deno.shared_globals.d.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/dts/lib.deno.shared_globals.d.ts')
-rw-r--r--cli/dts/lib.deno.shared_globals.d.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.shared_globals.d.ts b/cli/dts/lib.deno.shared_globals.d.ts
index be35fae01..849f9f835 100644
--- a/cli/dts/lib.deno.shared_globals.d.ts
+++ b/cli/dts/lib.deno.shared_globals.d.ts
@@ -225,6 +225,18 @@ declare namespace WebAssembly {
export function compile(bytes: BufferSource): Promise<Module>;
/**
+ * The `WebAssembly.compileStreaming()` function compiles a `WebAssembly.Module`
+ * directly from a streamed underlying source. This function is useful if it is
+ * necessary to a compile a module before it can be instantiated (otherwise, the
+ * `WebAssembly.instantiateStreaming()` function should be used).
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/compileStreaming)
+ */
+ export function compileStreaming(
+ source: Response | Promise<Response>,
+ ): Promise<Module>;
+
+ /**
* The WebAssembly.instantiate() function allows you to compile and instantiate
* WebAssembly code.
*
@@ -256,6 +268,18 @@ declare namespace WebAssembly {
): Promise<Instance>;
/**
+ * The `WebAssembly.instantiateStreaming()` function compiles and instantiates a
+ * WebAssembly module directly from a streamed underlying source. This is the most
+ * efficient, optimized way to load wasm code.
+ *
+ * [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/instantiateStreaming)
+ */
+ export function instantiateStreaming(
+ response: Response | PromiseLike<Response>,
+ importObject?: Imports,
+ ): Promise<WebAssemblyInstantiatedSource>;
+
+ /**
* The `WebAssembly.validate()` function validates a given typed array of
* WebAssembly binary code, returning whether the bytes form a valid wasm
* module (`true`) or not (`false`).