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

@tmlmt/cooklang-parser / IngredientQuantityAndGroup

Interface: IngredientQuantityAndGroup

Represents an AND group of quantities when primary units are incompatible but equivalents can be summed. For example: 1 large carrot + 2 small carrots, both with cup equivalents (resp. 2 cup and 1.5 cup) that sum to 5 cups.

Extends

Properties

alternatives?

optional alternatives: AlternativeIngredientRef[]

References to alternative ingredients for this quantity group. If undefined, this group has no alternatives.


and

and: QuantityWithPlainUnit[]

Inherited from

FlatAndGroup.and


equivalents?

optional equivalents: QuantityWithPlainUnit[]

The summed equivalent quantities (e.g., "5 cups" from summing "1.5 cup + 2 cup + 1.5 cup").