Prompt
This services works as an abstraction of the prompt
package in order to add support for
Promises, fix some quirks regarding boolean options, customize the interface just once and,
finally, integrate it withe Jimple.
Constructor Summary
Public Constructor | ||
public |
constructor(messagesPrefix: string) Class constructor. |
Method Summary
Public Methods | ||
public |
Invoke the |
|
public |
Get a property value from the history. |
|
public |
Access the history of the prompt. |
Public Constructors
Public Methods
public ask(schema: Object): Promise<Object, Error> source
Invoke the prompt
package and ask the user for input.
Params:
Name | Type | Attribute | Description |
schema | Object | The input data schema. For more information on how to build it, you
should check the |
public getValue(property: string): string source
Get a property value from the history.
Params:
Name | Type | Attribute | Description |
property | string | The name of the property. |
Return:
string (nullable: true) | If the property is on the history, it will return its value, otherwise it
will return |
public history(property: string): Object source
Access the history of the prompt.
Params:
Name | Type | Attribute | Description |
property | string | The name of the property you want to look on the history. |
Return:
Object (nullable: true) | If the property is present, it will return an object with the name as
|