diff --git a/lib/deno/mod.ts b/lib/deno/mod.ts index a0eed9f2260..c3553e032c0 100644 --- a/lib/deno/mod.ts +++ b/lib/deno/mod.ts @@ -52,6 +52,7 @@ let initializeWasCalled = false export const initialize: typeof types.initialize = async (options) => { options = common.validateInitializeOptions(options || {}) if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`) + if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`) if (options.worker) throw new Error(`The "worker" option only works in the browser`) if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once') await ensureServiceIsRunning() diff --git a/lib/npm/node.ts b/lib/npm/node.ts index eee195e6c58..6eddae2c621 100644 --- a/lib/npm/node.ts +++ b/lib/npm/node.ts @@ -226,6 +226,7 @@ let initializeWasCalled = false; export let initialize: typeof types.initialize = options => { options = common.validateInitializeOptions(options || {}); if (options.wasmURL) throw new Error(`The "wasmURL" option only works in the browser`) + if (options.wasmModule) throw new Error(`The "wasmModule" option only works in the browser`) if (options.worker) throw new Error(`The "worker" option only works in the browser`) if (initializeWasCalled) throw new Error('Cannot call "initialize" more than once') ensureServiceIsRunning()