1
0
Fork 0
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:
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;
}
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`. */