diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-27 12:44:02 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-27 13:44:02 +0200 |
commit | d77a55a97371f75eeabe39f4f051013029926839 (patch) | |
tree | 045d155e20e0033801e06e86f4ac4c8e587ae1df /cli/js/process.ts | |
parent | affba804546607c0d26887bb5c40cba9c9be3fe6 (diff) |
fix(cli/js/process): Fix conditional types for process sockets (#6275)
Diffstat (limited to 'cli/js/process.ts')
-rw-r--r-- | cli/js/process.ts | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cli/js/process.ts b/cli/js/process.ts index f318b0c1c..c7c3358f5 100644 --- a/cli/js/process.ts +++ b/cli/js/process.ts @@ -32,9 +32,15 @@ async function runStatus(rid: number): Promise<ProcessStatus> { export class Process<T extends RunOptions = RunOptions> { readonly rid: number; readonly pid: number; - readonly stdin!: T["stdin"] extends "piped" ? Writer & Closer : null; - readonly stdout!: T["stdout"] extends "piped" ? Reader & Closer : null; - readonly stderr!: T["stderr"] extends "piped" ? Reader & Closer : null; + readonly stdin!: T["stdin"] extends "piped" + ? Writer & Closer + : (Writer & Closer) | null; + readonly stdout!: T["stdout"] extends "piped" + ? Reader & Closer + : (Writer & Closer) | null; + readonly stderr!: T["stderr"] extends "piped" + ? Reader & Closer + : (Writer & Closer) | null; // @internal constructor(res: RunResponse) { |