@tmlmt/cooklang-parser / IngredientAlternativeBase
Type Alias: IngredientAlternativeBase
IngredientAlternativeBase =
object
Represents a single ingredient choice within a single or a group of IngredientItems. It points to a specific ingredient and its corresponding quantity information.
Properties
displayName
displayName:
string
The alias/name of the ingredient as it should be displayed for this occurrence.
index
index:
number
The index of the ingredient within the Recipe.ingredients array.
itemId?
optionalitemId:string
When Recipe.choices is populated for alternatives ingredients with group keys: the id of the corresponding ingredient item (e.g. "ingredient-item-2"). Can be useful for creating alternative selection UI elements with anchor links
note?
optionalnote:string
An optional note for this specific choice (e.g., "for a vegan version").