Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FluentType<T>

The FluentType class is the base of Fluent's type system.

Fluent types wrap JavaScript values and store additional configuration for them, which can then be used in the toString method together with a proper Intl formatter.

Type parameters

  • T

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

  • Create a FluentType instance.

    Parameters

    • value: T

      The JavaScript value to wrap.

    Returns FluentType

Properties

value

value: T

The wrapped native value.

Methods

Abstract toString

  • toString(scope: Scope): string
  • Format this instance of FluentType to a string.

    Formatted values are suitable for use outside of the FluentBundle. This method can use Intl formatters available through the scope argument.

    Parameters

    Returns string

valueOf

  • valueOf(): T
  • Unwrap the raw value stored by this FluentType.

    Returns T