composeCanvases
Key the authored canvases: the object key is the canvas id (stable identity: renaming a label must not move it) and object insertion order is canvas bar order.
Key the authored canvases: the object key is the canvas id (stable identity:
renaming a label must not move it) and object insertion order is canvas bar
order. Takes the handles composePages returned, so a canvas references
pages typed — renaming a page breaks the build, never the editor.
Import from @homepages/template-kit.
Signature
Section titled “Signature”function composeCanvases<T extends { [K in keyof T]: AuthoredCanvas; }>(canvases: T): { readonly [K in keyof T]: T[K] & { readonly id: string; }; }Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
canvases |
T |
required |
Returns
Section titled “Returns”{ readonly [K in keyof T]: T[K] & { readonly id: string; }; }
See also
Section titled “See also”canvascomposePagescomposeSectionsdefineTemplateorgsForScopepagevisibilityForScopeAuthoredCanvasAuthoredTemplateComposeEntryDefineTemplateCommonPageOptionsRoutedPageSectionInstanceHandleSiteInstanceSlotRefUnroutedPageAuthoredPageComposedCanvasComposedCanvasesComposedPageComposedPagesDefineTemplateInputTemplateScope