@tsed/di 6.98.0 → 6.98.1
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.
|
@@ -6,8 +6,6 @@ const ProviderRegistry_1 = require("../registries/ProviderRegistry");
|
|
|
6
6
|
* The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`.
|
|
7
7
|
* All classes annotated with `@Injectable()` are built one time, excepted if you change the default provider configuration.
|
|
8
8
|
*
|
|
9
|
-
* <<< @/docs/snippets/providers/getting-started-injectable.ts
|
|
10
|
-
*
|
|
11
9
|
* ::: tip
|
|
12
10
|
* `@Injectable()` use the `reflect-metadata` to collect and inject the built provided to other services.
|
|
13
11
|
* :::
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injectable.js","sourceRoot":"","sources":["../../../src/decorators/injectable.ts"],"names":[],"mappings":";;;AACA,qEAAgE;AAEhE
|
|
1
|
+
{"version":3,"file":"injectable.js","sourceRoot":"","sources":["../../../src/decorators/injectable.ts"],"names":[],"mappings":";;;AACA,qEAAgE;AAEhE;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAgB,UAAU,CAAC,UAA8B,EAAE;IACzD,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,IAAA,mCAAgB,EAAC;YACf,GAAG,OAAO;YACV,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAAC,CAAC,EAAC,OAAO,EAAE,MAAM,EAAC,CAAC;SAC9D,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC;AAPD,gCAOC","sourcesContent":["import type {IProvider} from \"../interfaces\";\nimport {registerProvider} from \"../registries/ProviderRegistry\";\n\n/**\n * The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`.\n * All classes annotated with `@Injectable()` are built one time, excepted if you change the default provider configuration.\n *\n * ::: tip\n * `@Injectable()` use the `reflect-metadata` to collect and inject the built provided to other services.\n * :::\n *\n * ### Options\n *\n * - type (@@ProviderType@@ or `string`): Kind of provider. (Default: `ProviderType.PROVIDER`)\n * - scope (@@ProviderScope@@): Kind of provider. (Default: `ProviderScope.SINGLETON`)\n * - provide (@@TokenProvider@@): An injection token (Note: This option override default metadata generated by Typescript).\n * - deps (`Type<any>`): List of class or provider which will be injected to the constructor (Note: This options override default metadata generated by Typescript).\n *\n * @returns {Function}\n * @decorator\n */\nexport function Injectable(options: Partial<IProvider> = {}): ClassDecorator {\n return (target: any) => {\n registerProvider({\n ...options,\n ...(options.provide ? {useClass: target} : {provide: target})\n });\n };\n}\n"]}
|
|
@@ -3,8 +3,6 @@ import { registerProvider } from "../registries/ProviderRegistry";
|
|
|
3
3
|
* The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`.
|
|
4
4
|
* All classes annotated with `@Injectable()` are built one time, excepted if you change the default provider configuration.
|
|
5
5
|
*
|
|
6
|
-
* <<< @/docs/snippets/providers/getting-started-injectable.ts
|
|
7
|
-
*
|
|
8
6
|
* ::: tip
|
|
9
7
|
* `@Injectable()` use the `reflect-metadata` to collect and inject the built provided to other services.
|
|
10
8
|
* :::
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injectable.js","sourceRoot":"","sources":["../../../src/decorators/injectable.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAEhE
|
|
1
|
+
{"version":3,"file":"injectable.js","sourceRoot":"","sources":["../../../src/decorators/injectable.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AAEhE;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,UAAU,CAAC,UAA8B,EAAE;IACzD,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,gBAAgB,CAAC;YACf,GAAG,OAAO;YACV,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,EAAC,QAAQ,EAAE,MAAM,EAAC,CAAC,CAAC,CAAC,EAAC,OAAO,EAAE,MAAM,EAAC,CAAC;SAC9D,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import type {IProvider} from \"../interfaces\";\nimport {registerProvider} from \"../registries/ProviderRegistry\";\n\n/**\n * The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`.\n * All classes annotated with `@Injectable()` are built one time, excepted if you change the default provider configuration.\n *\n * ::: tip\n * `@Injectable()` use the `reflect-metadata` to collect and inject the built provided to other services.\n * :::\n *\n * ### Options\n *\n * - type (@@ProviderType@@ or `string`): Kind of provider. (Default: `ProviderType.PROVIDER`)\n * - scope (@@ProviderScope@@): Kind of provider. (Default: `ProviderScope.SINGLETON`)\n * - provide (@@TokenProvider@@): An injection token (Note: This option override default metadata generated by Typescript).\n * - deps (`Type<any>`): List of class or provider which will be injected to the constructor (Note: This options override default metadata generated by Typescript).\n *\n * @returns {Function}\n * @decorator\n */\nexport function Injectable(options: Partial<IProvider> = {}): ClassDecorator {\n return (target: any) => {\n registerProvider({\n ...options,\n ...(options.provide ? {useClass: target} : {provide: target})\n });\n };\n}\n"]}
|
|
@@ -3,8 +3,6 @@ import type { IProvider } from "../interfaces";
|
|
|
3
3
|
* The decorators `@Injectable()` declare a new service can be injected in other service, controller, interceptor, etc.. on there `constructor`.
|
|
4
4
|
* All classes annotated with `@Injectable()` are built one time, excepted if you change the default provider configuration.
|
|
5
5
|
*
|
|
6
|
-
* <<< @/docs/snippets/providers/getting-started-injectable.ts
|
|
7
|
-
*
|
|
8
6
|
* ::: tip
|
|
9
7
|
* `@Injectable()` use the `reflect-metadata` to collect and inject the built provided to other services.
|
|
10
8
|
* :::
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/di",
|
|
3
|
-
"version": "6.98.
|
|
3
|
+
"version": "6.98.1",
|
|
4
4
|
"description": "DI module for Ts.ED Framework",
|
|
5
5
|
"private": false,
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"build:esm": "tsc --build tsconfig.compile.esm.json"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@tsed/core": "6.98.
|
|
22
|
-
"@tsed/schema": "6.98.
|
|
21
|
+
"@tsed/core": "6.98.1",
|
|
22
|
+
"@tsed/schema": "6.98.1",
|
|
23
23
|
"tslib": "2.2.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|