mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 05:04:48 +00:00
fix(cli/js/process): Fix conditional types for process sockets (#6275)
This commit is contained in:
parent
affba80454
commit
d77a55a973
2 changed files with 18 additions and 6 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue