TrueSelector class
Select all rules which evaluate to true.
- Extends
Properties
$kind |
Methods
initialize(On |
Initialize the selector with the set of rules. |
select(Action |
Select the best rule to execute. |
Inherited Methods
configure(Record<string, unknown>) | Fluent method for configuring the object. |
get |
Property Details
$kind
static $kind: string
Property Value
string
Method Details
initialize(OnCondition[], boolean)
Initialize the selector with the set of rules.
function initialize(conditionals: OnCondition[], evaluate: boolean)
Parameters
- conditionals
Possible rules to match.
- evaluate
-
boolean
True if rules should be evaluated on select.
select(ActionContext)
Select the best rule to execute.
function select(actionContext: ActionContext): Promise<OnCondition[]>
Parameters
- actionContext
- ActionContext
Dialog context for evaluation.
Returns
Promise<OnCondition[]>
A Promise with a number array.
Inherited Method Details
configure(Record<string, unknown>)
Fluent method for configuring the object.
function configure(config: Record<string, unknown>): this
Parameters
- config
-
Record<string, unknown>
Configuration settings to apply.
Returns
this
The Configurable after the operation is complete.
Inherited From Configurable.configure
getConverter(string)
function getConverter(_property: string): Converter | ConverterFactory
Parameters
- _property
-
string
The key of the conditional selector configuration.
Returns
Converter | ConverterFactory
The converter for the selector configuration.
Inherited From Configurable.getConverter