UNPKG

recipe-ts-runtime

Version:

TypeScript run-time library for the Recipe framework

24 lines (23 loc) 1.06 kB
export declare abstract class Ingredient { protected readonly properties: Map<string, any>; private readonly ingredientType; private readonly domain; protected constructor(type: string, domain?: string); getIngredientType(): string; getDomain(): string | null; protected _getProperty<T>(name: string): T; protected _hasProperty(name: string): boolean; protected _setRequired(name: string, value: any): void; protected _setOptional(name: string, repeatable: boolean, value: any): void; protected _setCompoundOptional(name: string, repeatable: boolean, ...keyValuePairs: any[]): void; protected duplicate(): Ingredient; protected cookbookTypeAndValueMatch(type: string, value: any): boolean; protected argsMatchSignature(args: any[], signature: string[]): boolean; toJSON(): any; static fromJSON(json: any, ingredientTypes: { [key: string]: Function; }): Ingredient; protected static deserialize(value: any, type: string, types: { [key: string]: Function; }): any; }