ParsedQuantity
Interface in @sascom/commonjs.
API catalogue · @sascom/commonjs · Interface
TypeScript#
interface ParsedQuantityA quantity that parsed
Members#
| Member | Kind | Description |
|---|---|---|
| assumedUnit | Property | The unit taken for a bare number; null when a unit was typed |
| exact | Property | Whether the value has at most 3 decimals in the typed unit (inches for "ft-in") |
| kind | Property | |
| ok | Property | |
| typedUnit | Property | The unit typed: a symbol, "ft-in" for feet with inches, "mixed" for other combinations, null for a bare number |
| unit | Property | The canonical unit's symbol |
| value | Property | In the canonical unit of the kind: mm, degrees, mm², mm³ |
assumedUnit#
TypeScript#
assumedUnit: string | nullThe unit taken for a bare number; null when a unit was typed
exact#
TypeScript#
exact: booleanWhether the value has at most 3 decimals in the typed unit (inches for "ft-in")
kind#
TypeScript#
kind: QuantityKindok#
TypeScript#
ok: truetypedUnit#
TypeScript#
typedUnit: string | nullThe unit typed: a symbol, "ft-in" for feet with inches, "mixed" for other combinations, null for a bare number
unit#
TypeScript#
unit: stringThe canonical unit's symbol
value#
TypeScript#
value: numberIn the canonical unit of the kind: mm, degrees, mm², mm³