FormatSpecHandle Class @beta

A handle to formatting and parsing specs for a specific KoQ and persistence unit. Reads the current specs from the provider on access. Use QuantityFormatter.getFormatSpecHandle to create instances.

When formatting is not yet ready, format returns a value.toString() fallback. Dispose the handle when it is no longer needed to invalidate it.

Implements

  • Disposable

Methods

Name Description
[dispose](): void Invalidate this handle.  
format(value: number): string Format a quantity value using the current spec.  

Properties

Name Type Description
formatterSpec Accessor ReadOnly undefined | FormatterSpec The current FormatterSpec, or undefined if not yet loaded.  
koqName Accessor ReadOnly string The KoQ name this handle is keyed to.  
parserSpec Accessor ReadOnly undefined | ParserSpec The current ParserSpec, or undefined if not yet loaded.  
persistenceUnit Accessor ReadOnly string The persistence unit this handle is keyed to.  
system Accessor ReadOnly undefined | UnitSystemKey The unit system this handle is pinned to, or undefined for the active system.  

Defined in

Last Updated: 08 May, 2026