@travetto/di
Advanced tools
Comparing version 0.0.30 to 0.0.31
@@ -33,3 +33,3 @@ { | ||
}, | ||
"version": "0.0.30" | ||
"version": "0.0.31" | ||
} |
import * as ts from 'typescript'; | ||
import { TransformUtil, Import, State } from '@travetto/compiler'; | ||
import { TransformUtil, State } from '@travetto/compiler'; | ||
import { ConfigLoader } from '@travetto/config'; | ||
@@ -111,3 +111,2 @@ | ||
} else { | ||
let original = undefined; | ||
const callExpr = (injectable && injectable.expression as any as ts.CallExpression); | ||
@@ -121,3 +120,2 @@ let injectConfig = undefined; | ||
if (args[0] && ts.isIdentifier(args[0])) { | ||
original = args[0]; | ||
injectConfig = args[1] as any; | ||
@@ -143,2 +141,10 @@ } | ||
ret.parent = node.parent; | ||
for (const el of ret.members) { | ||
if (!el.parent) { | ||
el.parent = node; | ||
} | ||
} | ||
return ret; | ||
@@ -175,4 +181,2 @@ } | ||
if (foundDec) { // Constructor | ||
const declTemp = (node.decorators || []).slice(0); | ||
let injectArgs: object[] = []; | ||
@@ -218,3 +222,3 @@ let original: any; | ||
node = ts.createMethod( | ||
const ret = ts.createMethod( | ||
decls!.filter(x => x !== foundDec).concat([ | ||
@@ -239,3 +243,5 @@ ts.createDecorator( | ||
return node; | ||
ret.parent = node.parent; | ||
return ret; | ||
} else { | ||
@@ -242,0 +248,0 @@ return node; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34064
844