FluentType
Object → FluentType
The base of values with custom formatting, inherit it to pass custom objects as variables.
Constructor
FluentType(value: any): FluentTypeFields
| Name | Type | Description |
|---|---|---|
value | any | The wrapped value. |
Methods
#FluentType:toString
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
| Name | Type | Description |
|---|---|---|
scopeoptional | fluent.Scope | The formatting state, the bundle is scope.bundle. |
Returns
| Type | Name | Description |
|---|---|---|
string | str | The formatted value. |