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

@tmlmt/cooklang-parser / IngredientItem

Interface: IngredientItem ​

Represents an ingredient item in a recipe step.

Properties ​

alternatives ​

alternatives: IngredientAlternative[]

A list of alternative ingredient choices. For a standard ingredient, this array will contain a single element.


group? ​

optional group?: string

An optional identifier for linking distributed alternatives. If multiple IngredientItems in a recipe share the same group ID (e.g., from @|group|... syntax), they represent a single logical choice.


id ​

id: string

The item identifier


subgroup? ​

optional subgroup?: string

An optional subgroup identifier for binding multiple ingredients together within a group. Ingredients sharing the same group and subgroup are selected together as a unit (e.g., from @|group/1|... syntax).


type ​

type: "ingredient"

The type of the item.