@alexanderson1993/cooklang-ts
Version:
Cooklang-TS is a TypeScript library for parsing and manipulating Cooklang recipes.
33 lines (32 loc) • 748 B
TypeScript
export interface Ingredient {
type: "ingredient";
name: string;
quantity: string | number;
units: string;
preparation?: string;
reference?: string;
step?: number;
}
export interface Cookware {
type: "cookware";
name: string;
quantity: string | number;
step?: number;
}
export interface Timer {
type: "timer";
name?: string;
quantity: string | number;
units: string;
}
export interface Text {
type: "text";
value: string;
}
export declare type Step = Array<Ingredient | Cookware | Timer | Text>;
export declare type Metadata = Record<string, string>;
export interface Item {
name: string;
synonym?: string;
}
export declare type ShoppingList = Record<string, Array<Item>>;