12345678910111213141516171819202122232425 |
- import { getDependencyByIndex } from './decorators';
- import { LookUp } from './types';
- function changeLookup(target, index, lookUp) {
- var descriptor = getDependencyByIndex(target, index);
- descriptor.lookUp = lookUp;
- }
- function lookupDecoratorFactoryProducer(lookUp) {
- return function DecoratorFactory() {
- if (this instanceof DecoratorFactory) {
- return this;
- }
- return function (target, _key, index) {
- changeLookup(target, index, lookUp);
- };
- };
- }
- /**
- * when resolving this dependency, skip the current injector
- */
- export var SkipSelf = lookupDecoratorFactoryProducer(LookUp.SKIP_SELF);
- /**
- * when resolving this dependency, only search the current injector
- */
- export var Self = lookupDecoratorFactoryProducer(LookUp.SELF);
- //# sourceMappingURL=dependencyLookUp.js.map
|