UNPKG

@visulima/email

Version:

A comprehensive email library with multi-provider support, crypto utilities, and template engines

26 lines (25 loc) 1.11 kB
import type { TemplateRenderer } from "./types.d.ts"; /** * Renders Handlebars template. * @param template Handlebars template string. * @param data Data to pass to the template. * @param options Handlebars compile options. * @returns Rendered HTML string. * @throws {TypeError} When template is not a string. * @throws {EmailError} When Handlebars is not installed or rendering fails. */ export declare const renderHandlebars: TemplateRenderer; /** * Registers a Handlebars helper function for use in templates. * @param name The name of the helper to register. * @param helper The helper function to register. * @throws {EmailError} When Handlebars is not installed. */ export declare const registerHandlebarsHelper: (name: string, helper: unknown) => void; /** * Registers a Handlebars partial template for reuse in other templates. * @param name The name of the partial to register. * @param partial The partial template string to register. * @throws {EmailError} When Handlebars is not installed. */ export declare const registerHandlebarsPartial: (name: string, partial: string) => void;