marko 6.0.0-next.3.21 → 6.0.0-next.3.23

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,4 @@
1
- type Falsy = undefined | null | false | 0 | "";
2
- export declare function forIn<V extends {}>(obj: Falsy | V, cb: <K extends keyof V>(key: K, value: V[K]) => void): void;
3
- export declare function forOf<T, V extends Iterable<T>>(list: Falsy | V, cb: (item: T, index: number) => void): void;
1
+ import type { Falsy } from "./types";
2
+ export declare function forIn(obj: Falsy | {}, cb: (key: string, value: unknown) => void): void;
3
+ export declare function forOf(list: Falsy | Iterable<unknown>, cb: (item: unknown, index: number) => void): void;
4
4
  export declare function forTo(to: number, from: number | Falsy, step: number | Falsy, cb: (index: number) => void): void;
5
- export {};
@@ -1,29 +1,30 @@
1
1
  import type { Renderer as ClientRenderer } from "../dom/renderer";
2
+ export type Falsy = undefined | null | false | 0 | "";
2
3
  export type CommentWalker = TreeWalker & Record<string, Comment>;
3
- export type Scope<T extends {
4
- [x: string | number]: unknown;
5
- } = {
6
- [x: string | number]: unknown;
7
- }> = [...unknown[]] & {
4
+ export interface BranchScope extends Scope {
5
+ ___parentBranch: BranchScope | undefined;
6
+ ___destroyed: 1 | undefined;
7
+ ___abortScopes: Set<Scope> | undefined;
8
+ ___branchScopes: Set<BranchScope> | undefined;
9
+ }
10
+ export interface Scope {
11
+ $global: Record<string, unknown>;
12
+ _: Scope | undefined;
8
13
  ___args: unknown;
9
14
  ___startNode: Node & ChildNode;
10
15
  ___endNode: Node & ChildNode;
11
- ___cleanup: Set<Scope> | undefined;
12
- ___client: 1 | undefined;
13
- ___bound: Map<unknown, unknown> | undefined;
16
+ ___pending: 1 | 0 | undefined;
14
17
  ___renderer: ClientRenderer | undefined;
15
- ___abortControllers: Map<string | number, AbortController> | undefined;
16
- ___cleanupOwner: Scope | undefined;
17
- $global: Record<string, unknown>;
18
- _: Scope | undefined;
18
+ ___abortControllers: Record<string | number, AbortController | void> | undefined;
19
+ ___closestBranch: BranchScope | undefined;
19
20
  [x: string | number]: any;
20
- } & T;
21
+ }
21
22
  export declare enum ResumeSymbol {
22
- SectionStart = "[",
23
- SectionEnd = "]",
24
- SectionSingleNodesEnd = "|",
25
23
  Node = "*",
26
- Cleanup = "$"
24
+ BranchStart = "[",
25
+ BranchEnd = "]",
26
+ BranchSingleNode = "|",
27
+ ClosestBranch = "$"
27
28
  }
28
29
  export declare enum AccessorChar {
29
30
  Dynamic = "?",