marko
Version:
Optimized runtime for Marko templates.
17 lines (16 loc) • 873 B
TypeScript
import { types as t } from "@marko/compiler";
import { WalkCode } from "../../common/types";
import { type Section } from "../util/sections";
type Walk = string | t.Expression | (() => undefined | string | t.Expression);
export declare enum Step {
Enter = 0,
Exit = 1
}
type VisitCodes = WalkCode.Get | WalkCode.Inside | WalkCode.Replace | WalkCode.DynamicTagWithVar;
export declare function enter(path: t.NodePath<any>): void;
export declare function exit(path: t.NodePath<any>): void;
export declare function enterShallow(path: t.NodePath<any>): void;
export declare function injectWalks(tag: t.NodePath<t.MarkoTag>, name: string, expr?: Walk): void;
export declare function visit(path: t.NodePath<t.MarkoTag | t.MarkoPlaceholder | t.Program>, code: VisitCodes): void;
export declare function getWalkString(section: Section): t.Expression | undefined;
export {};