From b3e189ee4f97a9d6c5b7a2164d644aa4c7fa4b79 Mon Sep 17 00:00:00 2001 From: Nayeem Rahman Date: Tue, 9 Jun 2020 12:18:18 +0100 Subject: fix(cli/js/process): Strengthen socket types based on pipes (#4836) --- cli/js/lib.deno.ns.d.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'cli/js/lib.deno.ns.d.ts') diff --git a/cli/js/lib.deno.ns.d.ts b/cli/js/lib.deno.ns.d.ts index 63e9b342e..c79007ebd 100644 --- a/cli/js/lib.deno.ns.d.ts +++ b/cli/js/lib.deno.ns.d.ts @@ -1741,12 +1741,12 @@ declare namespace Deno { options?: { recursive: boolean } ): AsyncIterableIterator; - export class Process { + export class Process { readonly rid: number; readonly pid: number; - readonly stdin?: Writer & Closer; - readonly stdout?: Reader & Closer; - readonly stderr?: Reader & Closer; + 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; /** Resolves to the current status of the process. */ status(): Promise; /** Buffer the stdout until EOF and return it as `Uint8Array`. @@ -1829,7 +1829,7 @@ declare namespace Deno { * Details of the spawned process are returned. * * Requires `allow-run` permission. */ - export function run(opt: RunOptions): Process; + export function run(opt: T): Process; interface InspectOptions { depth?: number; -- cgit v1.2.3