1
0
Fork 0
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:
Khải 2020-04-13 21:46:34 +07:00 committed by GitHub
parent e23f33de7b
commit ef76389e42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`. */