mirror of
https://github.com/denoland/deno.git
synced 2025-07-23 05:05:08 +00:00
change type of stdio handles in JS api (#4891)
This commit is contained in:
parent
4a8d25646a
commit
912a57f6a2
3 changed files with 82 additions and 12 deletions
24
cli/js/lib.deno.ns.d.ts
vendored
24
cli/js/lib.deno.ns.d.ts
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue