Interface UnitConverter<T>

Represents a unit conversion object with formatting, parsing, and unit options.

Type Parameters

  • T

Hierarchy

  • UnitConverter

Properties

Properties

formatter: ((unit: string, value: number, data: T) => string)

Type declaration

    • (unit: string, value: number, data: T): string
    • Parameters

      • unit: string
      • value: number
      • data: T

      Returns string

id: keyof UnitConverters
options: {
    text: string;
    value: string;
}[]
parser: ((unit: string, value: string | number, data: T) => number)

Type declaration

    • (unit: string, value: string | number, data: T): number
    • Parameters

      • unit: string
      • value: string | number
      • data: T

      Returns number

Generated using TypeDoc