marko 6.0.85 → 6.0.87

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,5 +1,6 @@
1
1
  import { types as t } from "@marko/compiler";
2
+ import { type Section } from "./sections";
2
3
  import { type SerializeReason, type SerializeReasons } from "./serialize-reasons";
3
- export declare function getSerializeGuard(reason: undefined | SerializeReason, optional: boolean): t.Expression | undefined;
4
- export declare function getSerializeGuardForAny(reasons: undefined | SerializeReasons, optional: boolean): t.Expression | undefined;
5
- export declare function getExprIfSerialized<T extends undefined | SerializeReason, U extends t.Expression>(reason: T, expr: U): T extends {} ? U : undefined;
4
+ export declare function getSerializeGuard(section: Section, reason: undefined | SerializeReason, optional: boolean): t.Expression | undefined;
5
+ export declare function getSerializeGuardForAny(section: Section, reasons: undefined | SerializeReasons, optional: boolean): t.Expression | undefined;
6
+ export declare function getExprIfSerialized<T extends undefined | SerializeReason, U extends t.Expression>(section: Section, reason: T, expr: U): T extends {} ? U : undefined;
@@ -1,6 +1,7 @@
1
1
  import { types as t } from "@marko/compiler";
2
2
  import { type BindingPropTree } from "../../util/binding-prop-tree";
3
3
  import { type Sources } from "../../util/references";
4
+ import { preAnalyze } from "./pre-analyze";
4
5
  export type ParamSerializeReason = NonNullable<Sources["param"]>;
5
6
  export interface ParamSerializeReasonGroup {
6
7
  id: symbol;
@@ -30,6 +31,9 @@ declare const _default: {
30
31
  enter(this: unknown, program: t.NodePath<t.Program>): void;
31
32
  exit(this: unknown, program: t.NodePath<t.Program>): void;
32
33
  };
34
+ transform: {
35
+ exit: typeof preAnalyze;
36
+ };
33
37
  analyze: {
34
38
  enter(this: unknown, program: t.NodePath<t.Program>): void;
35
39
  exit(this: unknown, program: t.NodePath<t.Program>): void;
@@ -0,0 +1,3 @@
1
+ import { types as t } from "@marko/compiler";
2
+ export declare function preAnalyze(program: t.NodePath<t.Program>): void;
3
+ export declare function getAssignmentInsertions(node: t.Node, insertions?: t.MarkoTag[] | undefined): t.MarkoTag[] | undefined;
@@ -1,8 +1,5 @@
1
1
  import { types as t } from "@marko/compiler";
2
2
  declare const _default: {
3
- transform: {
4
- enter(this: unknown, tag: t.NodePath<t.MarkoTag>): void;
5
- };
6
3
  analyze: {
7
4
  enter(this: unknown, tag: t.NodePath<t.MarkoTag>): void;
8
5
  exit(this: unknown, tag: t.NodePath<t.MarkoTag>): void;
@@ -13,9 +13,6 @@ declare module "@marko/compiler/dist/types" {
13
13
  }
14
14
  }
15
15
  declare const _default: {
16
- transform: {
17
- enter(this: unknown, tag: t.NodePath<t.MarkoTag>): void;
18
- };
19
16
  analyze: {
20
17
  enter(this: unknown, tag: t.NodePath<t.MarkoTag>): void;
21
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "marko",
3
- "version": "6.0.85",
3
+ "version": "6.0.87",
4
4
  "description": "Optimized runtime for Marko templates.",
5
5
  "keywords": [
6
6
  "api",