EvaluationOptions class
Options for evaluating LG templates.
Constructors
Evaluation |
Creates a new instance of the EvaluationOptions class. |
Properties
cache |
Cache scope of the evaluation result. |
Line |
|
locale | The locale info for evaluating LG. |
null |
|
strict |
Methods
merge(Evaluation |
Merges an incoming option to current option. If a property in incoming option is not null while it is null in current option, then the value of this property will be overwritten. |
Constructor Details
EvaluationOptions(EvaluationOptions | string[])
Creates a new instance of the EvaluationOptions class.
new EvaluationOptions(opt?: EvaluationOptions | string[])
Parameters
- opt
-
EvaluationOptions | string[]
Instance to copy initial settings from.
Property Details
cacheScope
Cache scope of the evaluation result.
cacheScope: LGCacheScope | undefined
Property Value
LGCacheScope | undefined
LineBreakStyle
locale
The locale info for evaluating LG.
locale: string
Property Value
string
nullSubstitution
nullSubstitution: (path: string) => unknown
Property Value
(path: string) => unknown
strictMode
strictMode: boolean | undefined
Property Value
boolean | undefined
Method Details
merge(EvaluationOptions)
Merges an incoming option to current option. If a property in incoming option is not null while it is null in current option, then the value of this property will be overwritten.
function merge(opt: EvaluationOptions): EvaluationOptions
Parameters
Incoming option for merging.
Returns
Result after merging.