@kaokei/di 3.0.3 → 3.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/dist/interfaces.d.cts +1 -0
- package/dist/interfaces.d.ts +1 -0
- package/package.json +3 -3
package/dist/interfaces.d.cts
CHANGED
|
@@ -5,6 +5,7 @@ import { KEYS } from './constants';
|
|
|
5
5
|
export type Newable<TInstance = unknown, TArgs extends unknown[] = any[]> = new (...args: TArgs) => TInstance;
|
|
6
6
|
export type InjectFunction<R extends (...args: any) => any> = (token: GenericToken) => ReturnType<R>;
|
|
7
7
|
export type CommonToken<T = unknown> = Token<T> | Newable<T>;
|
|
8
|
+
export type TokenType<T> = T extends CommonToken<infer U> ? U : never;
|
|
8
9
|
export type GenericToken<T = unknown> = Token<T> | Newable<T> | LazyToken<T>;
|
|
9
10
|
export type LazyTokenCallback<T = unknown> = () => CommonToken<T>;
|
|
10
11
|
export interface Context {
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { KEYS } from './constants';
|
|
|
5
5
|
export type Newable<TInstance = unknown, TArgs extends unknown[] = any[]> = new (...args: TArgs) => TInstance;
|
|
6
6
|
export type InjectFunction<R extends (...args: any) => any> = (token: GenericToken) => ReturnType<R>;
|
|
7
7
|
export type CommonToken<T = unknown> = Token<T> | Newable<T>;
|
|
8
|
+
export type TokenType<T> = T extends CommonToken<infer U> ? U : never;
|
|
8
9
|
export type GenericToken<T = unknown> = Token<T> | Newable<T> | LazyToken<T>;
|
|
9
10
|
export type LazyTokenCallback<T = unknown> = () => CommonToken<T>;
|
|
10
11
|
export interface Context {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaokei/di",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Tiny di library depends on typescript decorator.",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@types/fs-extra": "^11.0.4",
|
|
51
51
|
"@types/node": "^22.13.4",
|
|
52
52
|
"@vitejs/plugin-vue": "^5.2.1",
|
|
53
|
-
"@vitest/coverage-v8": "^3.
|
|
53
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
54
54
|
"@vue/test-utils": "^2.4.6",
|
|
55
55
|
"fs-extra": "^11.3.0",
|
|
56
56
|
"inversify": "^6.2.2",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"typescript": "~5.6.3",
|
|
61
61
|
"vite": "^5.4.14",
|
|
62
62
|
"vite-plugin-dts": "^4.5.0",
|
|
63
|
-
"vitest": "^3.
|
|
63
|
+
"vitest": "^3.1.1",
|
|
64
64
|
"vue": "^3.5.13",
|
|
65
65
|
"vue-router": "^4.5.0",
|
|
66
66
|
"vue-tsc": "^2.2.2"
|