Redigera

Dela via


EvaluationOptions class

Options for evaluating LG templates.

Constructors

EvaluationOptions(EvaluationOptions | string[])

Creates a new instance of the EvaluationOptions class.

Properties

cacheScope

Cache scope of the evaluation result.

LineBreakStyle
locale

The locale info for evaluating LG.

nullSubstitution
strictMode

Methods

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.

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

LineBreakStyle: LGLineBreakStyle | undefined

Property Value

LGLineBreakStyle | undefined

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

opt
EvaluationOptions

Incoming option for merging.

Returns

Result after merging.