mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 22:30:01 +00:00
Changes NodeJS.WritableStream to NodeJS.WriteStream and NodeJS.ReadableStream to NodeJS.ReadStream to correctly type check process.stdin, process.stdout, and process.stderr
This commit is contained in:
10
types/inquirer/index.d.ts
vendored
10
types/inquirer/index.d.ts
vendored
@@ -22,8 +22,12 @@ declare namespace inquirer {
|
||||
| Question<T>
|
||||
| ReadonlyArray<Question<T>>
|
||||
| Rx.Observable<Question<T>>;
|
||||
type OutputStreamOption = {output: NodeJS.WritableStream};
|
||||
type InputStreamOption = {input: NodeJS.ReadableStream};
|
||||
interface OutputStreamOption {
|
||||
output: NodeJS.WriteStream
|
||||
}
|
||||
interface InputStreamOption {
|
||||
input: NodeJS.ReadStream
|
||||
}
|
||||
type StreamOptions = InputStreamOption | OutputStreamOption | (InputStreamOption & OutputStreamOption);
|
||||
|
||||
interface Inquirer {
|
||||
@@ -38,7 +42,7 @@ declare namespace inquirer {
|
||||
* Create a new self-contained prompt module.
|
||||
* @param opt Object specifying input and output streams for the prompt
|
||||
*/
|
||||
createPromptModule(opt?: StreamOptions): PromptModule;
|
||||
createPromptModule(opt?: OutputStreamOption): PromptModule;
|
||||
/**
|
||||
* Public CLI helper interface
|
||||
* @param questions Questions settings array
|
||||
|
||||
Reference in New Issue
Block a user