mirror of
https://github.com/denoland/deno.git
synced 2025-01-09 15:48:16 -05:00
Convert ProcessStatus to a tagged union (#4732)
This commit is contained in:
parent
e23f33de7b
commit
ef76389e42
1 changed files with 11 additions and 5 deletions
14
cli/js/lib.deno.ns.d.ts
vendored
14
cli/js/lib.deno.ns.d.ts
vendored
|
@ -2175,11 +2175,17 @@ declare namespace Deno {
|
||||||
kill(signo: number): void;
|
kill(signo: number): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ProcessStatus {
|
export type ProcessStatus =
|
||||||
success: boolean;
|
| {
|
||||||
code?: number;
|
success: true;
|
||||||
signal?: number;
|
code: 0;
|
||||||
|
signal?: undefined;
|
||||||
}
|
}
|
||||||
|
| {
|
||||||
|
success: false;
|
||||||
|
code: number;
|
||||||
|
signal?: number;
|
||||||
|
};
|
||||||
|
|
||||||
/** **UNSTABLE**: `args` has been recently renamed to `cmd` to differentiate from
|
/** **UNSTABLE**: `args` has been recently renamed to `cmd` to differentiate from
|
||||||
* `Deno.args`. */
|
* `Deno.args`. */
|
||||||
|
|
Loading…
Reference in a new issue