runtime-compiler 3.1.4 → 3.1.6

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.
Files changed (2) hide show
  1. package/index.d.ts +12 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -19,12 +19,21 @@ export interface Scope {
19
19
  * Next available id.
20
20
  */
21
21
  1: number;
22
+ slice: () => this;
23
+ }
24
+ interface DeclareLocal {
25
+ <T>(scope: Scope, expr: Expression<T>): Identifier<T>;
26
+ (scope: Scope, expr: string): string;
22
27
  }
23
28
  /**
24
29
  * Declare a variable in the current scope.
25
30
  * Use in `default` and `build` mode.
26
31
  */
27
- export declare const declareLocal: (<T>(scope: Scope, expr: Expression<T>) => Identifier<T>) | ((scope: Scope, expr: string) => string);
32
+ export declare const declareLocal: DeclareLocal;
33
+ interface ExportLocal {
34
+ <T>(scope: Scope, expr: Expression<T>, parentScope: Scope): Identifier<T>;
35
+ (scope: Scope, expr: string, parentScope: Scope): string;
36
+ }
28
37
  /**
29
38
  * Export a local expression to a parent local variable.
30
39
  * Use in `default` and `build` mode.
@@ -35,7 +44,7 @@ export declare const declareLocal: (<T>(scope: Scope, expr: Expression<T>) => Id
35
44
  * // let d0;{let d1=1;d0=d1}
36
45
  * const id = exportLocal(childScope, declareLocal(childScope, '1'), parentScope); // d0
37
46
  */
38
- export declare const exportLocal: (<T>(scope: Scope, expr: Expression<T>, parentScope: Scope) => Identifier<T>) | ((scope: Scope, expr: string, parentScope: Scope) => string);
47
+ export declare const exportLocal: ExportLocal;
39
48
  /**
40
49
  * Mark current available variable id to be already in use.
41
50
  * Use in `hydrate` mode.
@@ -89,3 +98,4 @@ export declare let buildData: any[];
89
98
  * buildData[slot] ??= data;
90
99
  */
91
100
  export declare const createBuildSlot: () => number;
101
+ export {};
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"runtime-compiler","version":"3.1.4","description":"Universal compiler system","keywords":[],"repository":{},"homepage":"","license":"MIT","type":"module","exports":{"./utils":"./utils.js",".":"./index.js","./config/mode/build":"./config/mode/build.js","./config/loader/hydrate":"./config/loader/hydrate.js","./config/mode/hydrate":"./config/mode/hydrate.js","./config":"./config/index.js","./config/loader/build":"./config/loader/build.js"}}
1
+ {"name":"runtime-compiler","version":"3.1.6","description":"Universal compiler system","keywords":[],"repository":{},"homepage":"","license":"MIT","type":"module","exports":{".":"./index.js","./config/mode/hydrate":"./config/mode/hydrate.js","./config":"./config/index.js","./utils":"./utils.js","./config/loader/build":"./config/loader/build.js","./config/loader/hydrate":"./config/loader/hydrate.js","./config/mode/build":"./config/mode/build.js"}}