marko
Version:
Optimized runtime for Marko templates.
26 lines (25 loc) • 1.38 kB
TypeScript
import { types as t } from "@marko/compiler";
import { type BindingPropTree } from "./binding-prop-tree";
import { type Binding } from "./references";
import { type Section } from "./sections";
interface KnownExprs {
known?: Record<string, KnownExprs>;
value?: t.NodeExtra;
}
declare const kContentSection: unique symbol;
declare const kChildScopeBinding: unique symbol;
declare const kChildOffsetScopeBinding: unique symbol;
declare const kKnownExprs: unique symbol;
declare module "@marko/compiler/dist/types" {
interface MarkoTagExtra {
[kContentSection]?: Section;
[kChildScopeBinding]?: Binding;
[kChildOffsetScopeBinding]?: Binding;
[kKnownExprs]?: KnownExprs;
}
}
export declare function knownTagAnalyze(tag: t.NodePath<t.MarkoTag>, contentSection: Section, propTree: BindingPropTree | undefined): void;
export declare function knownTagTranslateHTML(tag: t.NodePath<t.MarkoTag>, tagIdentifier: t.Expression, contentSection: Section, propTree: BindingPropTree | undefined): void;
export declare function knownTagTranslateDOM(tag: t.NodePath<t.MarkoTag>, propTree: BindingPropTree | undefined, getBindingIdentifier: (binding: Binding, preferredName?: string) => t.Identifier, callSetup: (section: Section, childBinding: Binding) => void): void;
export declare function finalizeKnownTags(section: Section): void;
export {};