@tsed/di 7.52.0 → 7.54.0

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.
@@ -11,6 +11,7 @@ export declare class Provider<T = any> implements ProviderOpts<T> {
11
11
  type: TokenProvider | ProviderType;
12
12
  deps: TokenProvider[];
13
13
  imports: any[];
14
+ alias?: string;
14
15
  useFactory: Function;
15
16
  useAsyncFactory: Function;
16
17
  useValue: any;
@@ -8,6 +8,10 @@ export interface ProviderOpts<T = any> {
8
8
  * An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
9
9
  */
10
10
  provide: TokenProvider;
11
+ /**
12
+ * Create alias token to retrieve the instance provider.
13
+ */
14
+ alias?: TokenProvider;
11
15
  /**
12
16
  * Provider type
13
17
  */
@@ -79,6 +79,7 @@ export declare class InjectorService extends Container {
79
79
  * @param token
80
80
  */
81
81
  has(token: TokenProvider): boolean;
82
+ alias(token: TokenProvider, alias: TokenProvider): this;
82
83
  /**
83
84
  * Invoke the class and inject all services that required by the class constructor.
84
85
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/di",
3
- "version": "7.52.0",
3
+ "version": "7.54.0",
4
4
  "description": "DI module for Ts.ED Framework",
5
5
  "private": false,
6
6
  "source": "./src/index.ts",
@@ -28,17 +28,17 @@
28
28
  "tslib": "2.5.0"
29
29
  },
30
30
  "devDependencies": {
31
- "@tsed/core": "7.52.0",
31
+ "@tsed/core": "7.54.0",
32
32
  "@tsed/eslint": "7.44.1",
33
33
  "@tsed/logger": ">=6.2.2",
34
- "@tsed/schema": "7.52.0",
34
+ "@tsed/schema": "7.54.0",
35
35
  "@tsed/typescript": "7.44.1",
36
36
  "eslint": "^8.12.0"
37
37
  },
38
38
  "peerDependencies": {
39
- "@tsed/core": "^7.52.0",
39
+ "@tsed/core": "^7.54.0",
40
40
  "@tsed/logger": ">=6.2.2",
41
- "@tsed/schema": "^7.52.0"
41
+ "@tsed/schema": "^7.54.0"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "@tsed/core": {