Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions typings/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { TimersBinding } from './internalBinding/timers';
import { TypesBinding } from './internalBinding/types';
import { URLBinding } from './internalBinding/url';
import { UtilBinding } from './internalBinding/util';
import { WASIBinding } from './internalBinding/wasi';
import { WorkerBinding } from './internalBinding/worker';
import { ModulesBinding } from './internalBinding/modules';

Expand Down Expand Up @@ -48,6 +49,7 @@ interface InternalBindingMap {
types: TypesBinding;
url: URLBinding;
util: UtilBinding;
wasi: WASIBinding;
worker: WorkerBinding;
}

Expand Down
14 changes: 14 additions & 0 deletions typings/internalBinding/wasi.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
declare namespace InternalWASIBinding {
type EnvStr = `${string}=${string}`

class WASI {
constructor(args: string[], env: EnvStr[], preopens: string[], stdio: [stdin: number, stdout: number, stderr: number])

_setMemory(memory: WebAssembly.Memory): void;
}
}

export interface WASIBinding {
WASI: typeof InternalWASIBinding.WASI;
}