smartcli/dist/smartcli.classes.interaction.d.ts

33 lines
846 B
TypeScript
Raw Normal View History

2016-06-16 00:58:45 +00:00
import "typings-global";
2016-08-26 09:52:09 +00:00
/**
* allows to specify an user interaction during runtime
*/
export declare type questionType = "input" | "confirm" | "list" | "rawlist" | "expand" | "checkbox" | "password" | "editor";
export interface choiceObject {
name: string;
value: any;
}
export interface validateFunction {
(any: any): boolean;
}
export declare class Interaction {
constructor();
askQuestion(optionsArg: {
type: questionType;
message: string;
default: any;
choices: string[] | choiceObject[];
validate: validateFunction;
}): 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();
}