mirror of
https://github.com/denoland/deno.git
synced 2025-01-08 15:19:40 -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
16
cli/js/lib.deno.ns.d.ts
vendored
16
cli/js/lib.deno.ns.d.ts
vendored
|
@ -2175,11 +2175,17 @@ declare namespace Deno {
|
|||
kill(signo: number): void;
|
||||
}
|
||||
|
||||
export interface ProcessStatus {
|
||||
success: boolean;
|
||||
code?: number;
|
||||
signal?: number;
|
||||
}
|
||||
export type ProcessStatus =
|
||||
| {
|
||||
success: true;
|
||||
code: 0;
|
||||
signal?: undefined;
|
||||
}
|
||||
| {
|
||||
success: false;
|
||||
code: number;
|
||||
signal?: number;
|
||||
};
|
||||
|
||||
/** **UNSTABLE**: `args` has been recently renamed to `cmd` to differentiate from
|
||||
* `Deno.args`. */
|
||||
|
|
Loading…
Reference in a new issue