runtime-compiler 2.0.3 → 2.0.4
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.
- package/call.d.ts +2 -7
- package/call.js +1 -1
- package/package.json +6 -6
package/call.d.ts
CHANGED
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
import type { LocalDependency } from "./index.ts";
|
|
2
|
-
export type InferArgs<T extends LocalDependency<any>[]> = T extends [LocalDependency<infer First>, ...infer Rest extends LocalDependency<any>[]] ? [First, ...InferArgs<Rest>] : [];
|
|
3
2
|
/**
|
|
4
3
|
* Inject dependency to an fn for later compilation
|
|
5
4
|
*/
|
|
6
|
-
export declare const inject: <
|
|
7
|
-
const Deps extends LocalDependency<any>[],
|
|
8
|
-
Args extends any[],
|
|
9
|
-
Ret
|
|
10
|
-
>(deps: Deps, fn: (...args: [...InferArgs<Deps>, ...Args]) => Ret) => ((...args: Args) => Ret);
|
|
5
|
+
export declare const inject: (deps: LocalDependency<any>[], fn: any) => any;
|
|
11
6
|
/**
|
|
12
7
|
* Get fn injected dependency list
|
|
13
8
|
*/
|
|
14
|
-
export declare const getDeps: (fn:
|
|
9
|
+
export declare const getDeps: (fn: any) => LocalDependency<any>[] | undefined;
|
package/call.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let sym=Symbol();export let inject=(t,n)=>
|
|
1
|
+
let sym=Symbol();export let inject=(t,n)=>(n[sym]=t,n);export let getDeps=t=>t[sym];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "runtime-compiler",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Universal compiler system",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"repository": {},
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"type": "module",
|
|
10
10
|
"exports": {
|
|
11
|
-
"./call": "./call.js",
|
|
12
11
|
"./utils": "./utils.js",
|
|
12
|
+
".": "./index.js",
|
|
13
|
+
"./call": "./call.js",
|
|
13
14
|
"./config/mode/hydrate": "./config/mode/hydrate.js",
|
|
14
|
-
"./config": "./config/index.js",
|
|
15
|
-
"./config/loader/build": "./config/loader/build.js",
|
|
16
|
-
"./config/mode/build": "./config/mode/build.js",
|
|
17
15
|
"./config/loader/hydrate": "./config/loader/hydrate.js",
|
|
18
|
-
"
|
|
16
|
+
"./config/loader/build": "./config/loader/build.js",
|
|
17
|
+
"./config": "./config/index.js",
|
|
18
|
+
"./config/mode/build": "./config/mode/build.js"
|
|
19
19
|
}
|
|
20
20
|
}
|