Skip to main content
Up or down tonavigateEnter toselectEscape toclose⌘⇧KAI

method WASI.prototype.getImportObject

#WASI.prototype.getImportObject(): object

Return an import object that can be passed to WebAssembly.instantiate() if no other WASM imports are needed beyond those provided by WASI.

If version unstable was passed into the constructor it will return:

{ wasi_unstable: wasi.wasiImport }

If version preview1 was passed into the constructor or no version was specified it will return:

{ wasi_snapshot_preview1: wasi.wasiImport }

Return Type #

object