diff --git a/types/inquirer/index.d.ts b/types/inquirer/index.d.ts index 90697f2423..9f23ad21aa 100644 --- a/types/inquirer/index.d.ts +++ b/types/inquirer/index.d.ts @@ -22,8 +22,12 @@ declare namespace inquirer { | Question | ReadonlyArray> | Rx.Observable>; - 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