UNPKG

hmpl-dom

Version:

A module for using HMPL syntax directly in HTML, without the need for compilation on the JavaScript side

27 lines (26 loc) 779 B
import { HMPLInitFunction } from "./types"; /** * Initializes the HMPL DOM system with configuration options. * Can only be called once. Subsequent calls will throw an error. * * @param options - Array of configuration objects for different template options. * Each option should have a unique ID and contain compile options and template function options. * * @throws {Error} When called more than once * @throws {Error} When duplicate IDs are found in options * @throws {Error} When option structure is not valid * * @example * ```typescript * init([ * { * id: "user-card", * value: { * compile: { memo: true }, * templateFunction: { credentials: "include" } * } * } * ]); * ``` */ export declare const init: HMPLInitFunction;