Make amount for an ingredient optional.

This commit is contained in:
araemer 2025-10-21 15:32:48 +02:00
parent 3c9c94957f
commit 0dc2eb2e3c
4 changed files with 122 additions and 96 deletions

View file

@ -2,15 +2,15 @@
* Represents a single ingredient in a recipe.
*/
export interface IngredientModel {
id?: string
/** Name of the ingredient (e.g. "Spaghetti") */
name: string
id?: string
/** Name of the ingredient (e.g. "Spaghetti") */
name: string
/** Quantity required (e.g. 200, 1.5) */
amount: number
/** Quantity required (e.g. 200, 1.5) */
amount?: number
/** Unit of measurement (e.g. "g", "tbsp", "cups").
* Optional for cases like "1 egg".
*/
unit?: string
/** Unit of measurement (e.g. "g", "tbsp", "cups").
* Optional for cases like "1 egg".
*/
unit?: string
}