diff options
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 164 |
1 files changed, 0 insertions, 164 deletions
diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index 9e91c8800..d3bf8a91b 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -1470,170 +1470,6 @@ declare namespace Deno { /** **UNSTABLE**: New API, yet to be vetted. * - * @deprecated Use the Deno.Command API instead. - * - * Spawns a child process. - * - * If any stdio options are not set to `"piped"`, accessing the corresponding - * field on the `Child` or its `SpawnOutput` will throw a `TypeError`. - * - * If `stdin` is set to `"piped"`, the `stdin` {@linkcode WritableStream} - * needs to be closed manually. - * - * ```ts - * const child = Deno.spawnChild(Deno.execPath(), { - * args: [ - * "eval", - * "console.log('Hello World')", - * ], - * stdin: "piped", - * }); - * - * // open a file and pipe the subprocess output to it. - * child.stdout.pipeTo(Deno.openSync("output").writable); - * - * // manually close stdin - * child.stdin.close(); - * const status = await child.status; - * ``` - * - * @category Sub Process - */ - export function spawnChild( - command: string | URL, - options?: SpawnOptions, - ): Child; - - /** **UNSTABLE**: New API, yet to be vetted. - * - * @deprecated Use the Deno.Command API instead. - * - * The interface for handling a child process returned from - * {@linkcode Deno.spawnChild}. - * - * @category Sub Process - */ - export class Child { - get stdin(): WritableStream<Uint8Array>; - get stdout(): ReadableStream<Uint8Array>; - get stderr(): ReadableStream<Uint8Array>; - readonly pid: number; - /** Get the status of the child. */ - readonly status: Promise<ChildStatus>; - - /** Waits for the child to exit completely, returning all its output and - * status. */ - output(): Promise<SpawnOutput>; - /** Kills the process with given {@linkcode Deno.Signal}. Defaults to - * `"SIGTERM"`. */ - kill(signo?: Signal): void; - - /** Ensure that the status of the child process prevents the Deno process - * from exiting. */ - ref(): void; - /** Ensure that the status of the child process does not block the Deno - * process from exiting. */ - unref(): void; - } - - /** **UNSTABLE**: New API, yet to be vetted. - * - * @deprecated Use the Deno.Command API instead. - * - * Executes a subprocess, waiting for it to finish and collecting all of its - * output. - * - * Will throw an error if `stdin: "piped"` is passed. - * - * If options `stdout` or `stderr` are not set to `"piped"`, accessing the - * corresponding field on `SpawnOutput` will throw a `TypeError`. - * - * ```ts - * const { code, stdout, stderr } = await Deno.spawn(Deno.execPath(), { - * args: [ - * "eval", - * "console.log('hello'); console.error('world')", - * ], - * }); - * console.assert(code === 0); - * console.assert("hello\n" === new TextDecoder().decode(stdout)); - * console.assert("world\n" === new TextDecoder().decode(stderr)); - * ``` - * - * @category Sub Process - */ - export function spawn( - command: string | URL, - options?: SpawnOptions, - ): Promise<SpawnOutput>; - - /** **UNSTABLE**: New API, yet to be vetted. - * - * @deprecated Use the Deno.Command API instead. - * - * Synchronously executes a subprocess, waiting for it to finish and - * collecting all of its output. - * - * Will throw an error if `stdin: "piped"` is passed. - * - * If options `stdout` or `stderr` are not set to `"piped"`, accessing the - * corresponding field on `SpawnOutput` will throw a `TypeError`. - * - * ```ts - * const { code, stdout, stderr } = Deno.spawnSync(Deno.execPath(), { - * args: [ - * "eval", - * "console.log('hello'); console.error('world')", - * ], - * }); - * console.assert(code === 0); - * console.assert("hello\n" === new TextDecoder().decode(stdout)); - * console.assert("world\n" === new TextDecoder().decode(stderr)); - * ``` - * - * @category Sub Process - */ - export function spawnSync( - command: string | URL, - options?: SpawnOptions, - ): SpawnOutput; - - /** **UNSTABLE**: New API, yet to be vetted. - * - * @deprecated Use the Deno.Command API instead. - * - * @category Sub Process - */ - export interface ChildStatus { - /** If the child process exits with a 0 status code, `success` will be set - * to `true`, otherwise `false`. */ - success: boolean; - /** The exit code of the child process. */ - code: number; - /** The signal associated with the child process, present if - * {@linkcode Deno.spawn} was called. */ - signal: Signal | null; - } - - /** **UNSTABLE**: New API, yet to be vetted. - * - * @deprecated Use the Deno.Command API instead. - * - * The interface returned from calling {@linkcode Deno.spawn} or - * {@linkcode Deno.spawnSync} which represents the result of spawning the - * child process. - * - * @category Sub Process - */ - export interface SpawnOutput extends ChildStatus { - /** The buffered output from the child processes `stdout`. */ - readonly stdout: Uint8Array; - /** The buffered output from the child processes `stderr`. */ - readonly stderr: Uint8Array; - } - - /** **UNSTABLE**: New API, yet to be vetted. - * * Create a child process. * * If any stdio options are not set to `"piped"`, accessing the corresponding |