hmpl-js
Version:
🐜 HMPL.js is a lightweight server-oriented template language for JavaScript. Fetch HTML, render it safely, and keep apps dynamic, modern, and small.
15 lines (14 loc) • 511 B
TypeScript
import { HMPLCompile, HMPLRequestInfo } from "./types";
/**
* Converts a HMPLRequestInfo object to a JSON string.
* @param info - The HMPLRequestInfo object.
* @returns Request block.
*/
export declare const stringify: (info: HMPLRequestInfo) => string;
/**
* Compiles a template string into a HMPLTemplateFunction.
* @param template - The template string.
* @param options - The compilation options.
* @returns A function that creates template instances.
*/
export declare const compile: HMPLCompile;