Skip to main content

Class: NumberAndUnitFormat

Format for number with unit entries

Implements

  • Validator<number>
  • Formatter<number>

Constructors

constructor

new NumberAndUnitFormat(unit, options?, nullValueString?): NumberAndUnitFormat

CTOR

Parameters

NameTypeDefault valueDescription
unitstringundefinedA unit
optionsPartial<NumberAndUnitFormatOptions>{}Format options
nullValueStringstring''null value string

Returns

NumberAndUnitFormat

Defined in

workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Framework/FmcFormats.ts:296

Properties

nullValueString

Readonly nullValueString: string = ''

null value string

Implementation of

Formatter.nullValueString

Defined in

workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Framework/FmcFormats.ts:299


options

Protected Readonly options: NumberAndUnitFormatOptions

Defined in

workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Framework/FmcFormats.ts:288


unit

Protected Readonly unit: string

A unit

Defined in

workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Framework/FmcFormats.ts:297

Methods

format

format(value): string

Parameters

NameType
valuenumber

Returns

string

Inherit Doc

Implementation of

Formatter.format

Defined in

workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Framework/FmcFormats.ts:329


parse

parse(input): null | number

Parameters

NameType
inputstring

Returns

null | number

Inherit Doc

Implementation of

Validator.parse

Defined in

workingtitle-instruments-wt21/instruments/html_ui/Pages/VCockpit/Instruments/WT21/FMC/Framework/FmcFormats.ts:314