@tmlmt/cooklang-parser / IngredientAlternativeBase
Type Alias: IngredientAlternativeBase
IngredientAlternativeBase =
object
Base type of IngredientAlternative
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
linkedVariants?
optionallinkedVariants:string[]
Variants this alternative is linked to, based on step/section tags where it was parsed. If undefined, it is available in all variants.
note?
optionalnote:string
An optional note for this specific choice (e.g., "for a vegan version").