@tmlmt/cooklang-parser / GetIngredientQuantitiesOptions
Interface: GetIngredientQuantitiesOptions
Options for the getIngredientQuantities() method.
Properties
choices?
optionalchoices:RecipeChoices
The choices to apply when computing quantities. If not provided, uses primary alternatives (index 0 for all).
section?
optionalsection:number|Section
Filter ingredients to only those appearing in a specific section. Can be a Section object or section index (0-based).
step?
optionalstep:number|Step
Filter ingredients to only those appearing in a specific step. Can be a Step object or step index (0-based within the section, or global if no section specified).
variant?
optionalvariant:string
When step is a number, interpret it as a 0-based index into the steps that are active for this variant (i.e., the steps that would be visible when rendering with this variant), rather than into all steps in the section.
Has no effect when step is a Step object or when step is undefined.
Use "*" to refer to the default variant (steps tagged [*] and untagged steps).