Function intoParsedBy

  • Creates text input control converter that parses and formats input text with the given functions.

    Type Parameters

    • TValue

      Parsed input value type.

    Parameters

    • parse: ((this, text, errors) => TValue)

      Text parser function. Accepts input text and parse errors as its parameters and returns parsed value.

        • (this, text, errors): TValue
        • Parameters

          Returns TValue

    • Optional format: ((this, value) => string)

      Text formatter. Accepts value is its only parameter and returns formatted text. Standard to string conversion is used if omitted.

        • (this, value): string
        • Parameters

          • this: void
          • value: TValue

          Returns string

    Returns InConverter<string, TValue>

    New input converter.

Generated using TypeDoc