marko
Version:
Optimized runtime for Marko templates.
20 lines (19 loc) • 1.09 kB
TypeScript
import { types as t } from "@marko/compiler";
import type { Falsy } from "../../common/types";
import { _attr, _attr_class, _attr_style, _escape, _escape_comment, _escape_script, _escape_style, _unescaped } from "../../html";
export type DOMRuntimeHelpers = keyof typeof import("../../dom");
export type HTMLRuntimeHelpers = keyof typeof import("../../html");
export declare function importRuntime(name: DOMRuntimeHelpers | HTMLRuntimeHelpers): t.Identifier;
export declare function callRuntime(name: DOMRuntimeHelpers | HTMLRuntimeHelpers, ...args: Array<Parameters<typeof t.callExpression>[1][number] | Falsy>): t.CallExpression;
export declare function getHTMLRuntime(): {
_escape: typeof _escape;
_escape_comment: typeof _escape_comment;
_unescaped: typeof _unescaped;
_attr: typeof _attr;
_attr_class: typeof _attr_class;
_attr_style: typeof _attr_style;
_escape_script: typeof _escape_script;
_escape_style: typeof _escape_style;
};
export declare function getRuntimePath(output: string): string;
export declare function getCompatRuntimeFile(): string;