diff options
author | Casper Beyer <caspervonb@pm.me> | 2020-08-25 00:21:06 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-24 18:21:06 +0200 |
commit | e8968e6bf4b3883c7d660034ae46c4584dadc119 (patch) | |
tree | 6b95ae8911cf59ffabb5cb51161d0fb2b22e670c /std/wasi/snapshot_preview1.ts | |
parent | c1d543e10a85347c1c219202b10ab2e5cccf942c (diff) |
BREAKING(std/wasi): rename Module to Context (#7110)
This commit renames Module and ModuleOptions to context to avoid stutter
confusion, e.g avoid having documentation that says things like
instantiate the snapshot's module's module.
Diffstat (limited to 'std/wasi/snapshot_preview1.ts')
-rw-r--r-- | std/wasi/snapshot_preview1.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/std/wasi/snapshot_preview1.ts b/std/wasi/snapshot_preview1.ts index 0e32e3a2b..ab9da73ec 100644 --- a/std/wasi/snapshot_preview1.ts +++ b/std/wasi/snapshot_preview1.ts @@ -277,14 +277,14 @@ function errno(err: Error) { } } -export interface ModuleOptions { +export interface ContextOptions { args?: string[]; env?: { [key: string]: string | undefined }; preopens?: { [key: string]: string }; memory?: WebAssembly.Memory; } -export default class Module { +export default class Context { args: string[]; env: { [key: string]: string | undefined }; memory: WebAssembly.Memory; @@ -294,7 +294,7 @@ export default class Module { exports: Record<string, Function>; - constructor(options: ModuleOptions) { + constructor(options: ContextOptions) { this.args = options.args ? options.args : []; this.env = options.env ? options.env : {}; this.memory = options.memory!; |