diff options
author | Stanislav <62983943+stanislavstrelnikov@users.noreply.github.com> | 2020-07-07 04:45:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 21:45:39 -0400 |
commit | 158ae0bfe900d2bac3076390c4fe3d2b54d94fe5 (patch) | |
tree | 209e4b5682e2a899041767c49428e34329e48084 /cli/js/process.ts | |
parent | ab4c574f5202f607ceb6068f56b3cc8aed1bbbaf (diff) |
clean up code in cli/js (#6611)
Diffstat (limited to 'cli/js/process.ts')
-rw-r--r-- | cli/js/process.ts | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/cli/js/process.ts b/cli/js/process.ts index c7c3358f5..ff9251697 100644 --- a/cli/js/process.ts +++ b/cli/js/process.ts @@ -1,4 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. + import { File } from "./files.ts"; import { close } from "./ops/resources.ts"; import { Closer, Reader, Writer } from "./io.ts"; @@ -10,7 +11,7 @@ import { kill, runStatus as runStatusOp, run as runOp } from "./ops/process.ts"; export interface RunOptions { cmd: string[]; cwd?: string; - env?: { [key: string]: string }; + env?: Record<string, string>; stdout?: "inherit" | "piped" | "null" | number; stderr?: "inherit" | "piped" | "null" | number; stdin?: "inherit" | "piped" | "null" | number; @@ -100,16 +101,8 @@ export class Process<T extends RunOptions = RunOptions> { } export type ProcessStatus = - | { - success: true; - code: 0; - signal?: undefined; - } - | { - success: false; - code: number; - signal?: number; - }; + | { success: true; code: 0; signal?: undefined } + | { success: false; code: number; signal?: number }; function isRid(arg: unknown): arg is number { return !isNaN(arg as number); |