@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?
optionalgroup?: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?
optionalsubgroup?: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.