Skip to content
Français

defineRecipeComponent

import { defineRecipeComponent } from "@elie-laloum/outpost/recipes";

Declare a named YAML component factory with a static options schema, result validator and optional owned-resource disposer. Declaration does not invoke the factory.

Complete example and detailed rules.

  • definitionRequired
    RecipeComponentDefinition
    Factory descriptor to validate and freeze; it defines one component name and category.

RecipeComponentDefinition

export declare function defineRecipeComponent(
  definition: RecipeComponentDefinition,
): RecipeComponentDefinition;