Skip to content
HomePagesHomePages template kit

BakedRowsFactory

The schema-bound `bakedRows` a `defineFixtures` build callback receives alongside `scenario`: the rows a whole-row-baked record list resolves to for one scenario, produced by the same projection the runtime bake uses.

The schema-bound bakedRows a defineFixtures build callback receives alongside scenario: the rows a whole-row-baked record list resolves to for one scenario, produced by the same projection the runtime bake uses.

A fixture needs it only to build a state out of rows the scenario cannot produce on its own — a slice, or a row with one field emptied. A state that wants the scenario’s own rows states nothing: resolution applies the projection automatically.

Import from @homepages/template-kit/fixtures.

export type BakedRowsFactory<S> = <K extends BakedSlotKeys<S>>(key: ScenarioKey, slot: K) => SlotValue<SlotsOf<S>[K]>;