2016-08-26 09:52:09 +00:00
|
|
|
/**
|
|
|
|
* allows to specify an user interaction during runtime
|
|
|
|
*/
|
2016-10-14 22:56:02 +00:00
|
|
|
export declare type questionType = 'input' | 'confirm' | 'list' | 'rawlist' | 'expand' | 'checkbox' | 'password' | 'editor';
|
|
|
|
export interface IChoiceObject {
|
2016-08-26 09:52:09 +00:00
|
|
|
name: string;
|
|
|
|
value: any;
|
|
|
|
}
|
2016-10-14 22:56:02 +00:00
|
|
|
export interface IValidateFunction {
|
2016-08-26 09:52:09 +00:00
|
|
|
(any: any): boolean;
|
|
|
|
}
|
|
|
|
export declare class Interaction {
|
|
|
|
constructor();
|
|
|
|
askQuestion(optionsArg: {
|
|
|
|
type: questionType;
|
|
|
|
message: string;
|
|
|
|
default: any;
|
2016-10-14 22:56:02 +00:00
|
|
|
choices: string[] | IChoiceObject[];
|
|
|
|
validate: IValidateFunction;
|
2016-08-26 09:52:09 +00:00
|
|
|
}): void;
|
|
|
|
askQuestionArray: any;
|
|
|
|
}
|
|
|
|
export declare class QuestionTree {
|
|
|
|
constructor(questionString: string, optionsArray: any);
|
|
|
|
}
|
|
|
|
export declare class QuestionTreeNode {
|
|
|
|
constructor();
|
|
|
|
}
|
|
|
|
export declare class QuestionStorage {
|
2016-06-16 00:58:45 +00:00
|
|
|
constructor();
|
|
|
|
}
|