⚠️ This is pre-release documentation for v3. For stable docs, visit v2.
Skip to content

@tmlmt/cooklang-parser / UnitFractionConfig

Interface: UnitFractionConfig

Configuration for fraction display on a unit

Properties

denominators?

optional denominators: number[]

Allowed denominators (default: [2, 3, 4, 8])


enabled

enabled: boolean

Whether to approximate decimals as fractions for this unit


maxWhole?

optional maxWhole: number

Maximum whole number in mixed fraction before falling back to decimal (default: 4)