@tmlmt/cooklang-parser / Unit
Interface: Unit
Represents a unit used to describe quantities
Extended by
Properties
integerProtected?
optionalintegerProtected?:boolean
This property is set to true when the unit is prefixed by an = sign in the cooklang file, e.g. =g Indicates that quantities with this unit should be treated as integers only (no decimal/fractional values).
name
name:
string
unitOrder?
optionalunitOrder?:"quantity-first"|"unit-first"
Controls whether the unit is rendered before or after the numeric quantity. Populated automatically by resolveUnit when the alias is listed in unitFirstAliases. Can also be set directly on a custom Unit object as an override.