Skip to content
HomePagesHomePages template kit

ScenarioFactory

The schema-bound `scenario` a `defineFixtures` build callback receives: it starts one {@link FixtureSpec} from a scenario, authoring that section's non-source-bound slots.

The schema-bound scenario a defineFixtures build callback receives: it starts one {@link FixtureSpec} from a scenario, authoring that section’s non-source-bound slots. key is a ScenarioKey, so an unknown scenario name is a compile error, as is an unknown or source-bound slot key.

Import from @homepages/template-kit/fixtures.

export type ScenarioFactory<S> = <M extends object>(key: ScenarioKey, slots: ExactMap<M, AuthoredSlots<S>>) => FixtureSpec<S>;