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

@tmlmt/cooklang-parser / IngredientItemQuantity

Interface: IngredientItemQuantity

Represents a contributor to an ingredient's total quantity, corresponding to a single mention in the recipe text. It can contain multiple equivalent quantities (e.g., in different units).

Extends

Properties

equivalents?

optional equivalents: QuantityWithExtendedUnit[]

A list of equivalent quantities/units for this ingredient mention besides the primary quantity. For @salt{1%tsp|5%g}, the main quantity is 1 tsp and the equivalents will contain 5 g.


quantity

quantity: FixedValue | Range

Inherited from

QuantityWithExtendedUnit.quantity


scalable

scalable: boolean

Indicates whether this quantity should be scaled when the recipe serving size changes.


unit?

optional unit: Unit

Inherited from

QuantityWithExtendedUnit.unit