Constructors
constructor
- new default(interrupt?: Prompt, ...args: any[]): default
-
Parameters
-
Optional
interrupt: Prompt
-
Rest
...args: any[]
Methods
addArgs
- addArgs(...args: any[]): default
-
setCanCancel
- setCanCancel(canCancel?: boolean): default
-
Parameters
-
canCancel: boolean = true
setTopMenu
-
withChoice
- withChoice(...choices: default[]): Promise<default>
-
Returns Promise<default>
withConfirmation
- withConfirmation(): Promise<boolean>
-
Returns Promise<boolean>
withInfo
- withInfo(): Promise<void>
-
Returns Promise<void>
withInitializer
- withInitializer(initializer?: ((menu: default) => any)): default
-
Parameters
-
Optional
initializer: ((menu: default) => any)
withInput
- withInput(input?: ((input: default) => any)): Promise<string>
-
Parameters
-
Optional
input: ((input: default) => any)
Returns Promise<string>
withLoading
- withLoading(until?: Promise<any> | (() => Promise<any>), canCancel?: boolean | NullaryFunction<any>, loadType?: LoadType, choices?: default[], cancelPromise?: default<void>): Promise<undefined | default>
-
Parameters
-
Optional
until: Promise<any> | (() => Promise<any>)
-
Optional
canCancel: boolean | NullaryFunction<any>
-
Optional
loadType: LoadType
-
Optional
choices: default[]
-
Optional
cancelPromise: default<void>
Returns Promise<undefined | default>
withMenu
-
Parameters
-
-
Optional
initializer: ((menu: M) => any)
-
- (menu: M): any
-
Returns any
Returns Promise<void>