Template
Type Template
type Template<PropsInput extends Record<string, any> = Record<string, any>, PropsOutput = PropsInput> = {
$Infer?: { Props?: { Input?: PropsInput; Output?: PropsOutput } }
props?: StandardSchemaV1<PropsInput, PropsOutput>
template: (props: PropsOutput, ctx: TemplateContext) => Awaitable<PDFDocument | string | ArrayBuffer | Uint8Array>
transformProps?: (props: PropsOutput, ctx: TemplateContext) => Awaitable<PropsOutput>
}Properties
$Infer
{ Props?: { Input?: PropsInput; Output?: PropsOutput } }Type Declaration
Props
{ Input?: PropsInput; Output?: PropsOutput }Type Declaration
Input
PropsInputDefined in packages/templates/src/types.ts:32
Output
PropsOutputDefined in packages/templates/src/types.ts:33
Defined in packages/templates/src/types.ts:30
Defined in packages/templates/src/types.ts:28
props
StandardSchemaV1<PropsInput, PropsOutput>Defined in packages/templates/src/types.ts:24
template
(props: PropsOutput, ctx: TemplateContext) => Awaitable<PDFDocument | string | ArrayBuffer | Uint8Array>Defined in packages/templates/src/types.ts:20
transformProps
(props: PropsOutput, ctx: TemplateContext) => Awaitable<PropsOutput>Defined in packages/templates/src/types.ts:25
Defined in packages/templates/src/types.ts:16