change type of stdio handles in JS api (#4891)

This commit is contained in:
Bartek Iwańczuk 2020-04-25 01:01:25 +02:00 committed by GitHub
parent 4a8d25646a
commit 912a57f6a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 82 additions and 12 deletions

View file

@ -825,12 +825,24 @@ declare namespace Deno {
close(): void;
}
/** An instance of `Deno.File` for `stdin`. */
export const stdin: File;
/** An instance of `Deno.File` for `stdout`. */
export const stdout: File;
/** An instance of `Deno.File` for `stderr`. */
export const stderr: File;
export interface Stdin extends Reader, SyncReader, Closer {
readonly rid: number;
}
export interface Stdout extends Writer, SyncWriter, Closer {
readonly rid: number;
}
export interface Stderr extends Writer, SyncWriter, Closer {
readonly rid: number;
}
/** A handle for `stdin`. */
export const stdin: Stdin;
/** A handle for `stdout`. */
export const stdout: Stdout;
/** A handle for `stderr`. */
export const stderr: Stderr;
export interface OpenOptions {
/** Sets the option for read access. This option, when `true`, means that the