defineSchema
Declare a section's schema from `label` + per-kind slot builders.
Declare a section’s schema from label + per-kind slot builders. Returns the
authored { meta, slots } shape CI serializes, with SectionProps<typeof schema> byte-identical to the hand-written as const form.
Import from @homepages/template-kit.
Signature
Section titled “Signature”function defineSchema<const Slots extends Record<string, Slot>, const Display extends DisplayInput = Record<string, never>, const Layout extends SectionLayoutOf<Slots> = readonly []>(input: DefineSchemaInput<Slots, Display, Layout>): DefinedSchema<Slots, Display, Layout>Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
input |
DefineSchemaInput<Slots, Display, Layout> |
required |
Returns
Section titled “Returns”DefinedSchema<Slots, Display, Layout>