0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-29 08:58:01 -04:00

docs(std/wasi): document ContextOptions (#8715)

This commit is contained in:
Casper Beyer 2020-12-10 23:13:57 +08:00 committed by GitHub
parent f91fa16661
commit 5f05e1783e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -279,9 +279,32 @@ export class ExitStatus {
}
export interface ContextOptions {
/**
* An array of strings that the WebAssembly instance will see as command-line
* arguments.
*
* The first argument is the virtual path to the command itself.
*/
args?: string[];
/**
* An object of string keys mapped to string values that the WebAssembly module will see as its environment.
*/
env?: { [key: string]: string | undefined };
/**
* An object of string keys mapped to string values that the WebAssembly module will see as it's filesystem.
*
* The string keys of are treated as directories within the sandboxed
* filesystem, the values are the real paths to those directories on the host
* machine.
*
*/
preopens?: { [key: string]: string };
/**
* Determines if calls to exit from within the WebAssembly module will terminate the proess or return.
*/
exitOnReturn?: boolean;
}