Comparing version 0.3.9 to 0.3.10
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const power_di_1 = require("power-di"); | ||
const lib_1 = require("../../lib"); | ||
const IOC = Symbol('Application#PowerDI'); | ||
@@ -12,2 +13,7 @@ module.exports = { | ||
}, | ||
get getComponent() { | ||
return function (clsType) { | ||
return lib_1.getInstance(clsType, this, undefined); | ||
}; | ||
} | ||
}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const power_di_1 = require("power-di"); | ||
const lib_1 = require("../../lib"); | ||
const IOC = Symbol('Context#PowerDI'); | ||
@@ -12,2 +13,7 @@ module.exports = { | ||
}, | ||
get getComponent() { | ||
return function (clsType) { | ||
return lib_1.getInstance(clsType, this.app, this); | ||
}; | ||
} | ||
}; |
@@ -6,1 +6,10 @@ export * from './decorators'; | ||
export * from './aspect'; | ||
import 'chair'; | ||
declare module 'chair' { | ||
interface Context { | ||
getComponent<T = any>(clsType: any): T; | ||
} | ||
interface Application { | ||
getComponent<T = any>(clsType: any): T; | ||
} | ||
} |
@@ -12,1 +12,2 @@ "use strict"; | ||
tslib_1.__exportStar(require("./aspect"), exports); | ||
require("chair"); |
{ | ||
"name": "egg-aop", | ||
"version": "0.3.9", | ||
"version": "0.3.10", | ||
"description": "aop for egg.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
16808
421