UNPKG

marko

Version:

Optimized runtime for Marko templates.

26 lines (25 loc) • 1.44 kB
import { types as t } from "@marko/compiler"; import { type Binding } from "./bindings"; import { type ParamsTree } from "./params-tree"; import { type KnownExprs } from "./reasons"; import { type Section } from "./sections"; declare const kChildSection: unique symbol; declare const kParamsTree: unique symbol; declare const kKnownExprs: unique symbol; declare module "@marko/compiler/dist/types" { interface MarkoTagExtra { /** The dom binding a known tag holds its child's scope in. */ childScopeBinding?: Binding; [kChildSection]?: Section; /** The child's params tree the call site was analyzed against. */ [kParamsTree]?: ParamsTree; [kKnownExprs]?: KnownExprs; } } export declare function knownTagAnalyze(tag: t.NodePath<t.MarkoTag>, childSection: Section, childParamsTree?: ParamsTree): void; export declare function analyzeRecursiveTags(): void; export declare function knownTagTranslateHTML(tag: t.NodePath<t.MarkoTag>, tagIdentifier: t.Expression): void; export declare function knownTagTranslateDOM(tag: t.NodePath<t.MarkoTag>, getBindingIdentifier: (binding: Binding, preferredName?: string, directContent?: boolean) => t.Identifier, callSetup: ((section: Section, childBinding: Binding) => void) | undefined): void; export declare function addKnownTagReasons(section: Section): void; export declare function callsOtherTemplateSetup(section: Section): boolean; export {};