import type { EmailMessage } from "../types.mjs"; /** A compiled template — a function that takes typed variables and * returns a partial `EmailMessage` ready to splat into `email.send()`. */ export type TemplateFn< Vars, Output extends Partial > = (vars: Vars) => Output; /** Declare a template with compile-time-checked variables. * * ```ts * const welcome = defineTemplate<{ name: string }>(({ name }) => ({ * subject: `Welcome, ${name}!`, * react: , * })) * * await email.send({ from, to, ...welcome({ name: "Ada" }) }) * ``` * * Pass `render` as a function that produces whichever shape you want * (`{ react }`, `{ jsx }`, `{ mjml }`, or direct `{ html }`) — all of * them land as a typed `Partial`. */ export declare function defineTemplate(render: (vars: Vars) => Partial): TemplateFn>;