marko 6.0.55 → 6.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { types as t } from "@marko/compiler";
|
2
|
-
type MarkoExprRootPath = t.NodePath<t.MarkoTag | t.MarkoTagBody | t.MarkoAttribute | t.MarkoSpreadAttribute | t.MarkoScriptlet | t.MarkoPlaceholder>;
|
2
|
+
export type MarkoExprRootPath = t.NodePath<t.MarkoTag | t.MarkoTagBody | t.MarkoAttribute | t.MarkoSpreadAttribute | t.MarkoScriptlet | t.MarkoPlaceholder>;
|
3
3
|
export declare function getMarkoRoot(path: t.NodePath<t.Node>): MarkoExprRootPath | null;
|
4
4
|
export declare function getExprRoot(path: t.NodePath<t.Node>): t.NodePath<t.Node>;
|
5
5
|
export declare function getFnRoot(path: t.NodePath<t.Node>): t.NodePath<t.ArrowFunctionExpression | t.FunctionExpression | t.ObjectMember> | undefined;
|
6
|
+
export declare function getDeclarationRoot(path: t.NodePath<t.Node>): t.NodePath<t.FunctionDeclaration | t.VariableDeclaration> | undefined;
|
6
7
|
export declare function isMarko(path: t.NodePath<any>): path is MarkoExprRootPath;
|
7
|
-
export {};
|
@@ -52,6 +52,7 @@ declare module "@marko/compiler/dist/types" {
|
|
52
52
|
interface NodeExtra {
|
53
53
|
section?: Section;
|
54
54
|
referencedBindings?: ReferencedBindings;
|
55
|
+
downstream?: Opt<Binding>;
|
55
56
|
binding?: Binding;
|
56
57
|
assignment?: Binding;
|
57
58
|
assignmentTo?: Binding;
|
@@ -85,7 +86,7 @@ export declare const intersectionMeta: WeakMap<Intersection, {
|
|
85
86
|
id: number;
|
86
87
|
scopeOffset: Binding | undefined;
|
87
88
|
}>;
|
88
|
-
export declare function
|
89
|
+
export declare function setBindingDownstream(binding: Binding, expr: boolean | Opt<t.NodeExtra>): void;
|
89
90
|
export declare function createSources(state: Sources["state"], input: Sources["input"]): Sources;
|
90
91
|
export declare function compareSources(a: Sources, b: Sources): number;
|
91
92
|
export declare function mergeSources(a: undefined | Sources, b: undefined | Sources): Sources | undefined;
|
@@ -120,4 +121,7 @@ export interface RegisteredFnExtra extends ReferencedExtra {
|
|
120
121
|
referencedBindingsInFunction: ReferencedBindings;
|
121
122
|
}
|
122
123
|
export declare function isRegisteredFnExtra(extra: t.NodeExtra | undefined): extra is RegisteredFnExtra;
|
124
|
+
export declare function getCanonicalExtra<T extends t.NodeExtra>(extra: T): T;
|
125
|
+
export declare function couldSerializeExtra(extra: t.NodeExtra): boolean;
|
126
|
+
export declare function couldSerializeBinding(binding: Binding): boolean;
|
123
127
|
export {};
|