mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-17 22:44:18 +08:00
Added Question.pageSize and enhancing Question.validate in Inquirer (#16160)
* Added pageSize to the Question interface in Inquirer * Added answers to Question.validate() in Inquirer
This commit is contained in:
committed by
Sheetal Nandi
parent
54017f4f76
commit
fc63d5f5cc
6
types/inquirer/index.d.ts
vendored
6
types/inquirer/index.d.ts
vendored
@@ -94,7 +94,7 @@ declare namespace inquirer {
|
||||
* Receive the user input and should return true if the value is valid, and an error message (String)
|
||||
* otherwise. If false is returned, a default error message is provided.
|
||||
*/
|
||||
validate?(input: string): boolean | string;
|
||||
validate?(input: string, answers?: Answers): boolean | string;
|
||||
/**
|
||||
* Receive the user input and return the filtered value to be used inside the program.
|
||||
* The value returned will be added to the Answers hash.
|
||||
@@ -106,6 +106,10 @@ declare namespace inquirer {
|
||||
*/
|
||||
when?: boolean | ((answers: Answers) => boolean);
|
||||
paginated?: boolean;
|
||||
/**
|
||||
* Change the number of lines that will be rendered when using list, rawList, expand or checkbox.
|
||||
*/
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user