dreamworkAPI
Ctrl K
GitHub
classDocs / FluentType

FluentType

classsharedmenusource
Object → FluentType

The base of values with custom formatting, inherit it to pass custom objects as variables.

Constructor

FluentType(value: any): FluentType

Fields

NameTypeDescription
valueanyThe wrapped value.

Methods

#FluentType:toString

sharedmenunodiscardsource
function FluentType:toString(scope?: fluent.Scope): string

Formats the value, called when the value is placed into a pattern.

The base implementation formats numbers with the bundle locale and converts other values with tostring.

Parameters
NameTypeDescription
scopeoptionalfluent.ScopeThe formatting state, the bundle is scope.bundle.
Returns
TypeNameDescription
stringstrThe formatted value.

Subclasses

FluentDateTime, FluentNone, FluentNumber

Generated from the dreamwork meta branch.