@travetto/di 3.1.0 → 3.1.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.
- package/package.json +2 -2
- package/src/decorator.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@travetto/di",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "Dependency registration/management and injection support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ast-transformations",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"directory": "module/di"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@travetto/registry": "^3.1.
|
|
30
|
+
"@travetto/registry": "^3.1.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@travetto/transformer": "^3.1.0"
|
package/src/decorator.ts
CHANGED
|
@@ -54,7 +54,7 @@ export function InjectArgs(configs?: InjectConfig[][]) {
|
|
|
54
54
|
* @augments `@travetto/di:Inject`
|
|
55
55
|
*/
|
|
56
56
|
export function Inject(first?: InjectConfig | symbol, ...args: (InjectConfig | undefined)[]) {
|
|
57
|
-
return (target: unknown, propertyKey
|
|
57
|
+
return (target: unknown, propertyKey?: string, idx?: number | PropertyDescriptor): void => {
|
|
58
58
|
if (typeof idx !== 'number') { // Only register if on property
|
|
59
59
|
const config: InjectConfig = collapseConfig(first, ...args);
|
|
60
60
|
|