UNPKG

marko

Version:

Optimized runtime for Marko templates.

8 lines (7 loc) • 693 B
import { types as t } from "@marko/compiler"; import { type Binding } from "./bindings"; export default function translateVar(tag: t.NodePath<t.MarkoTag>, initialValue: t.Expression, kind?: "let" | "const", statements?: t.Statement[]): void; export declare function isTagVarAssigned(tag: t.NodePath<t.MarkoTag>): boolean; export declare function buildVarChange(target: t.Expression, value: t.Expression, varBinding: Binding): t.CallExpression; export declare function getRestPattern(rest: Binding, id: t.Identifier, from: Binding, shorthand: boolean): t.ArrayPattern | t.ObjectPattern; export declare function withRestFallback(rest: Binding, from: Binding, value: t.Expression): t.Expression;