@nx-ddd/core 0.0.0-PLACEHOLDER
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/README.md +11 -0
- package/di/create-injector.d.ts +4 -0
- package/di/create-injector.js +21 -0
- package/di/create-injector.js.map +1 -0
- package/di/definition-factory.d.ts +24 -0
- package/di/definition-factory.js +22 -0
- package/di/definition-factory.js.map +1 -0
- package/di/forward_ref.d.ts +49 -0
- package/di/forward_ref.js +57 -0
- package/di/forward_ref.js.map +1 -0
- package/di/index.d.ts +3 -0
- package/di/index.js +7 -0
- package/di/index.js.map +1 -0
- package/di/injectable.d.ts +7 -0
- package/di/injectable.js +34 -0
- package/di/injectable.js.map +1 -0
- package/di/injector.d.ts +3 -0
- package/di/injector.js +23 -0
- package/di/injector.js.map +1 -0
- package/di/interface/defs.d.ts +181 -0
- package/di/interface/defs.js +137 -0
- package/di/interface/defs.js.map +1 -0
- package/di/interface/provider.d.ts +324 -0
- package/di/interface/provider.js +10 -0
- package/di/interface/provider.js.map +1 -0
- package/di/interface/type.d.ts +3 -0
- package/di/interface/type.js +3 -0
- package/di/interface/type.js.map +1 -0
- package/di/provider-collection.d.ts +7 -0
- package/di/provider-collection.js +45 -0
- package/di/provider-collection.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.js +7 -0
- package/index.js.map +1 -0
- package/nx-module/index.d.ts +2 -0
- package/nx-module/index.js +6 -0
- package/nx-module/index.js.map +1 -0
- package/nx-module/nx-module-ref.d.ts +15 -0
- package/nx-module/nx-module-ref.js +27 -0
- package/nx-module/nx-module-ref.js.map +1 -0
- package/nx-module/nx-module.d.ts +6 -0
- package/nx-module/nx-module.js +16 -0
- package/nx-module/nx-module.js.map +1 -0
- package/package.json +12 -0
- package/test-bed/index.d.ts +10 -0
- package/test-bed/index.js +32 -0
- package/test-bed/index.js.map +1 -0
- package/testing/index.d.ts +20 -0
- package/testing/index.js +32 -0
- package/testing/index.js.map +1 -0
- package/util/array_utils.d.ts +1 -0
- package/util/array_utils.js +8 -0
- package/util/array_utils.js.map +1 -0
- package/util/empty.d.ts +2 -0
- package/util/empty.js +6 -0
- package/util/empty.js.map +1 -0
- package/util/property.d.ts +19 -0
- package/util/property.js +34 -0
- package/util/property.js.map +1 -0
- package/util/stringify.d.ts +17 -0
- package/util/stringify.js +49 -0
- package/util/stringify.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# core
|
|
2
|
+
|
|
3
|
+
This library was generated with [Nx](https://nx.dev).
|
|
4
|
+
|
|
5
|
+
## Running unit tests
|
|
6
|
+
|
|
7
|
+
Run `nx test core` to execute the unit tests via [Jest](https://jestjs.io).
|
|
8
|
+
|
|
9
|
+
## Running lint
|
|
10
|
+
|
|
11
|
+
Run `nx lint core` to execute the lint via [ESLint](https://eslint.org/).
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Injector } from './injector';
|
|
2
|
+
import { StaticProvider } from './interface/provider';
|
|
3
|
+
export declare function createInjector(defType: any, additionalProviders?: StaticProvider[] | null, parent?: Injector | null, name?: string): Injector;
|
|
4
|
+
export declare function createInjectorWithoutInjectorInstances(defType: any, parent?: Injector | null, additionalProviders?: StaticProvider[] | null, name?: string): Injector;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createInjectorWithoutInjectorInstances = exports.createInjector = void 0;
|
|
4
|
+
const empty_1 = require("../util/empty");
|
|
5
|
+
const stringify_1 = require("../util/stringify");
|
|
6
|
+
const injector_1 = require("./injector");
|
|
7
|
+
const provider_collection_1 = require("./provider-collection");
|
|
8
|
+
function createInjector(defType, additionalProviders = null, parent = null, name) {
|
|
9
|
+
return createInjectorWithoutInjectorInstances(defType, parent, additionalProviders, name);
|
|
10
|
+
}
|
|
11
|
+
exports.createInjector = createInjector;
|
|
12
|
+
function createInjectorWithoutInjectorInstances(defType, parent = null, additionalProviders = null, name) {
|
|
13
|
+
const providers = [
|
|
14
|
+
...(0, provider_collection_1.internalImportProvidersFrom)(defType),
|
|
15
|
+
...(additionalProviders || empty_1.EMPTY_ARRAY),
|
|
16
|
+
];
|
|
17
|
+
name = name || (typeof defType === 'object' ? undefined : (0, stringify_1.stringify)(defType));
|
|
18
|
+
return (0, injector_1.resolveAndCreate)(providers, parent || injector_1.Injector.NULL);
|
|
19
|
+
}
|
|
20
|
+
exports.createInjectorWithoutInjectorInstances = createInjectorWithoutInjectorInstances;
|
|
21
|
+
//# sourceMappingURL=create-injector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-injector.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/core/src/di/create-injector.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,iDAA8C;AAC9C,yCAAwD;AAExD,+DAAoE;AAEpE,SAAgB,cAAc,CAC5B,OAAoC,EACpC,sBAA+C,IAAI,EACnD,SAA0B,IAAI,EAC9B,IAAa;IAEb,OAAO,sCAAsC,CAAC,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,IAAI,CAAC,CAAC;AAC5F,CAAC;AAPD,wCAOC;AAED,SAAgB,sCAAsC,CACpD,OAAoC,EACpC,SAA0B,IAAI,EAC9B,sBAA+C,IAAI,EACnD,IAAa;IAEb,MAAM,SAAS,GAAG;QAChB,GAAG,IAAA,iDAA2B,EAAC,OAAO,CAAC;QACvC,GAAG,CAAC,mBAAmB,IAAI,mBAAW,CAAC;KACxC,CAAC;IACF,IAAI,GAAG,IAAI,IAAI,CAAC,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,qBAAS,EAAC,OAAO,CAAC,CAAC,CAAC;IAC9E,OAAO,IAAA,2BAAgB,EAAC,SAAS,EAAE,MAAM,IAAI,mBAAQ,CAAC,IAAI,CAAC,CAAC;AAC9D,CAAC;AAZD,wFAYC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Type } from './interface/type';
|
|
9
|
+
/**
|
|
10
|
+
* Definition of what a factory function should look like.
|
|
11
|
+
*/
|
|
12
|
+
export declare type FactoryFn<T> = {
|
|
13
|
+
/**
|
|
14
|
+
* Subclasses without an explicit constructor call through to the factory of their base
|
|
15
|
+
* definition, providing it with their own constructor to instantiate.
|
|
16
|
+
*/
|
|
17
|
+
<U extends T>(t?: Type<U>): U;
|
|
18
|
+
/**
|
|
19
|
+
* If no constructor to instantiate is provided, an instance of type T itself is created.
|
|
20
|
+
*/
|
|
21
|
+
(t?: undefined): T;
|
|
22
|
+
};
|
|
23
|
+
export declare function getFactoryDef<T>(type: any, throwNotFound: true): FactoryFn<T>;
|
|
24
|
+
export declare function getFactoryDef<T>(type: any): FactoryFn<T> | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.getFactoryDef = void 0;
|
|
11
|
+
const stringify_1 = require("../util/stringify");
|
|
12
|
+
// import {NG_FACTORY_DEF} from './fields';
|
|
13
|
+
const NG_FACTORY_DEF = 'ɵfac';
|
|
14
|
+
function getFactoryDef(type, throwNotFound) {
|
|
15
|
+
const hasFactoryDef = type.hasOwnProperty(NG_FACTORY_DEF);
|
|
16
|
+
if (!hasFactoryDef && throwNotFound === true) {
|
|
17
|
+
throw new Error(`Type ${(0, stringify_1.stringify)(type)} does not have 'ɵfac' property.`);
|
|
18
|
+
}
|
|
19
|
+
return hasFactoryDef ? type[NG_FACTORY_DEF] : null;
|
|
20
|
+
}
|
|
21
|
+
exports.getFactoryDef = getFactoryDef;
|
|
22
|
+
//# sourceMappingURL=definition-factory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-factory.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/core/src/di/definition-factory.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,iDAA4C;AAC5C,2CAA2C;AAE3C,MAAM,cAAc,GAAG,MAAM,CAAC;AAoB9B,SAAgB,aAAa,CAAI,IAAS,EAAE,aAAuB;IACjE,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAC1D,IAAI,CAAC,aAAa,IAAI,aAAa,KAAK,IAAI,EAAE;QAC5C,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAA,qBAAS,EAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;KAC3E;IACD,OAAO,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACrD,CAAC;AAND,sCAMC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Type } from './interface/type';
|
|
9
|
+
/**
|
|
10
|
+
* An interface that a function passed into {@link forwardRef} has to implement.
|
|
11
|
+
*
|
|
12
|
+
* @usageNotes
|
|
13
|
+
* ### Example
|
|
14
|
+
*
|
|
15
|
+
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref_fn'}
|
|
16
|
+
* @publicApi
|
|
17
|
+
*/
|
|
18
|
+
export interface ForwardRefFn {
|
|
19
|
+
(): any;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Allows to refer to references which are not yet defined.
|
|
23
|
+
*
|
|
24
|
+
* For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
|
|
25
|
+
* DI is declared, but not yet defined. It is also used when the `token` which we use when creating
|
|
26
|
+
* a query is not yet defined.
|
|
27
|
+
*
|
|
28
|
+
* @usageNotes
|
|
29
|
+
* ### Example
|
|
30
|
+
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
|
31
|
+
* @publicApi
|
|
32
|
+
*/
|
|
33
|
+
export declare function forwardRef(forwardRefFn: ForwardRefFn): Type<any>;
|
|
34
|
+
/**
|
|
35
|
+
* Lazily retrieves the reference value from a forwardRef.
|
|
36
|
+
*
|
|
37
|
+
* Acts as the identity function when given a non-forward-ref value.
|
|
38
|
+
*
|
|
39
|
+
* @usageNotes
|
|
40
|
+
* ### Example
|
|
41
|
+
*
|
|
42
|
+
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
|
|
43
|
+
*
|
|
44
|
+
* @see `forwardRef`
|
|
45
|
+
* @publicApi
|
|
46
|
+
*/
|
|
47
|
+
export declare function resolveForwardRef<T>(type: T): T;
|
|
48
|
+
/** Checks whether a function is wrapped by a `forwardRef`. */
|
|
49
|
+
export declare function isForwardRef(fn: any): fn is () => any;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.isForwardRef = exports.resolveForwardRef = exports.forwardRef = void 0;
|
|
11
|
+
const property_1 = require("../util/property");
|
|
12
|
+
const stringify_1 = require("../util/stringify");
|
|
13
|
+
const __forward_ref__ = (0, property_1.getClosureSafeProperty)({ __forward_ref__: property_1.getClosureSafeProperty });
|
|
14
|
+
/**
|
|
15
|
+
* Allows to refer to references which are not yet defined.
|
|
16
|
+
*
|
|
17
|
+
* For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
|
|
18
|
+
* DI is declared, but not yet defined. It is also used when the `token` which we use when creating
|
|
19
|
+
* a query is not yet defined.
|
|
20
|
+
*
|
|
21
|
+
* @usageNotes
|
|
22
|
+
* ### Example
|
|
23
|
+
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
|
|
24
|
+
* @publicApi
|
|
25
|
+
*/
|
|
26
|
+
function forwardRef(forwardRefFn) {
|
|
27
|
+
forwardRefFn.__forward_ref__ = forwardRef;
|
|
28
|
+
forwardRefFn.toString = function () {
|
|
29
|
+
return (0, stringify_1.stringify)(this());
|
|
30
|
+
};
|
|
31
|
+
return forwardRefFn;
|
|
32
|
+
}
|
|
33
|
+
exports.forwardRef = forwardRef;
|
|
34
|
+
/**
|
|
35
|
+
* Lazily retrieves the reference value from a forwardRef.
|
|
36
|
+
*
|
|
37
|
+
* Acts as the identity function when given a non-forward-ref value.
|
|
38
|
+
*
|
|
39
|
+
* @usageNotes
|
|
40
|
+
* ### Example
|
|
41
|
+
*
|
|
42
|
+
* {@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
|
|
43
|
+
*
|
|
44
|
+
* @see `forwardRef`
|
|
45
|
+
* @publicApi
|
|
46
|
+
*/
|
|
47
|
+
function resolveForwardRef(type) {
|
|
48
|
+
return isForwardRef(type) ? type() : type;
|
|
49
|
+
}
|
|
50
|
+
exports.resolveForwardRef = resolveForwardRef;
|
|
51
|
+
/** Checks whether a function is wrapped by a `forwardRef`. */
|
|
52
|
+
function isForwardRef(fn) {
|
|
53
|
+
return typeof fn === 'function' && fn.hasOwnProperty(__forward_ref__) &&
|
|
54
|
+
fn.__forward_ref__ === forwardRef;
|
|
55
|
+
}
|
|
56
|
+
exports.isForwardRef = isForwardRef;
|
|
57
|
+
//# sourceMappingURL=forward_ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forward_ref.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/core/src/di/forward_ref.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAGH,+CAAwD;AACxD,iDAA4C;AAiB5C,MAAM,eAAe,GAAG,IAAA,iCAAsB,EAAC,EAAC,eAAe,EAAE,iCAAsB,EAAC,CAAC,CAAC;AAE1F;;;;;;;;;;;GAWG;AACH,SAAgB,UAAU,CAAC,YAA0B;IAC7C,YAAa,CAAC,eAAe,GAAG,UAAU,CAAC;IAC3C,YAAa,CAAC,QAAQ,GAAG;QAC7B,OAAO,IAAA,qBAAS,EAAC,IAAI,EAAE,CAAC,CAAC;IAC3B,CAAC,CAAC;IACF,OAAwB,YAAa,CAAC;AACxC,CAAC;AAND,gCAMC;AAED;;;;;;;;;;;;GAYG;AACH,SAAgB,iBAAiB,CAAI,IAAO;IAC1C,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;AAC5C,CAAC;AAFD,8CAEC;AAED,8DAA8D;AAC9D,SAAgB,YAAY,CAAC,EAAO;IAClC,OAAO,OAAO,EAAE,KAAK,UAAU,IAAI,EAAE,CAAC,cAAc,CAAC,eAAe,CAAC;QACjE,EAAE,CAAC,eAAe,KAAK,UAAU,CAAC;AACxC,CAAC;AAHD,oCAGC"}
|
package/di/index.d.ts
ADDED
package/di/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./create-injector"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./injectable"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./injector"), exports);
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
package/di/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/core/src/di/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC;AAClC,uDAA6B;AAC7B,qDAA2B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import 'reflect-metadata';
|
|
2
|
+
import { Injector } from 'injection-js';
|
|
3
|
+
export declare function Injectable(params?: {
|
|
4
|
+
providedIn: 'root';
|
|
5
|
+
}): (target: any) => any;
|
|
6
|
+
export declare function setCurrentInjector(injector: Injector): void;
|
|
7
|
+
export { Inject, Optional, InjectionToken } from 'injection-js';
|
package/di/injectable.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InjectionToken = exports.Optional = exports.Inject = exports.setCurrentInjector = exports.Injectable = void 0;
|
|
4
|
+
require("reflect-metadata");
|
|
5
|
+
const injection_js_1 = require("injection-js");
|
|
6
|
+
function Injectable(params) {
|
|
7
|
+
return (target) => {
|
|
8
|
+
if ((params === null || params === void 0 ? void 0 : params.providedIn) === 'root') {
|
|
9
|
+
target.providedIn = 'root';
|
|
10
|
+
const paramTypes = Reflect.getMetadata("design:paramtypes", target) || [];
|
|
11
|
+
const params = Reflect.getMetadata("parameters", target);
|
|
12
|
+
const deps = paramTypes.map((paramType, i) => { var _a, _b; return ((_b = (_a = params === null || params === void 0 ? void 0 : params[i]) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.token) || paramType; });
|
|
13
|
+
target['Θfac'] = compileFactory(target, deps);
|
|
14
|
+
}
|
|
15
|
+
return (0, injection_js_1.Injectable)()(target);
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
exports.Injectable = Injectable;
|
|
19
|
+
let currentInjector;
|
|
20
|
+
function setCurrentInjector(injector) {
|
|
21
|
+
currentInjector = injector;
|
|
22
|
+
}
|
|
23
|
+
exports.setCurrentInjector = setCurrentInjector;
|
|
24
|
+
function inject(token) {
|
|
25
|
+
return currentInjector.get(token);
|
|
26
|
+
}
|
|
27
|
+
function compileFactory(target, deps) {
|
|
28
|
+
return () => { var _a; return (_a = target['Θins']) !== null && _a !== void 0 ? _a : (target['Θins'] = new target(...deps.map(dep => inject(dep)))); };
|
|
29
|
+
}
|
|
30
|
+
var injection_js_2 = require("injection-js");
|
|
31
|
+
Object.defineProperty(exports, "Inject", { enumerable: true, get: function () { return injection_js_2.Inject; } });
|
|
32
|
+
Object.defineProperty(exports, "Optional", { enumerable: true, get: function () { return injection_js_2.Optional; } });
|
|
33
|
+
Object.defineProperty(exports, "InjectionToken", { enumerable: true, get: function () { return injection_js_2.InjectionToken; } });
|
|
34
|
+
//# sourceMappingURL=injectable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injectable.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/core/src/di/injectable.ts"],"names":[],"mappings":";;;AAAA,4BAA0B;AAC1B,+CAAkF;AAElF,SAAgB,UAAU,CAAC,MAA8B;IACvD,OAAO,CAAC,MAAW,EAAE,EAAE;QACrB,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,UAAU,MAAK,MAAM,EAAE;YACjC,MAAM,CAAC,UAAU,GAAG,MAAM,CAAC;YAC3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;YAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;YACzD,MAAM,IAAI,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,CAAC,EAAE,EAAE,eAAC,OAAA,CAAA,MAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,CAAC,CAAC,0CAAG,CAAC,CAAC,0CAAE,KAAK,KAAI,SAAS,CAAA,EAAA,CAAC,CAAC;YACpF,MAAM,CAAC,MAAM,CAAC,GAAG,cAAc,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;SAC/C;QACD,OAAO,IAAA,yBAAW,GAAE,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC,CAAA;AACH,CAAC;AAXD,gCAWC;AAED,IAAI,eAAyB,CAAC;AAE9B,SAAgB,kBAAkB,CAAC,QAAkB;IACnD,eAAe,GAAG,QAAQ,CAAC;AAC7B,CAAC;AAFD,gDAEC;AAED,SAAS,MAAM,CAAC,KAAK;IACnB,OAAO,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,cAAc,CAAC,MAAM,EAAE,IAAI;IAClC,OAAO,GAAG,EAAE,wBAAC,MAAM,CAAC,MAAM,qCAAb,MAAM,CAAC,MAAM,IAAM,IAAI,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,IAAA,CAAC;AAC9E,CAAC;AAED,6CAAgE;AAAvD,sGAAA,MAAM,OAAA;AAAE,wGAAA,QAAQ,OAAA;AAAE,8GAAA,cAAc,OAAA"}
|
package/di/injector.d.ts
ADDED
package/di/injector.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.resolveAndCreate = exports.Injector = void 0;
|
|
4
|
+
const injection_js_1 = require("injection-js");
|
|
5
|
+
const injectable_1 = require("./injectable");
|
|
6
|
+
var injection_js_2 = require("injection-js");
|
|
7
|
+
Object.defineProperty(exports, "Injector", { enumerable: true, get: function () { return injection_js_2.Injector; } });
|
|
8
|
+
function resolveAndCreate(providers, parent = injection_js_1.Injector.NULL) {
|
|
9
|
+
const injector = injection_js_1.ReflectiveInjector.resolveAndCreate(providers, parent);
|
|
10
|
+
const originalGet = injector.get;
|
|
11
|
+
injector.get = function (token, notFoundValue) {
|
|
12
|
+
(0, injectable_1.setCurrentInjector)(this);
|
|
13
|
+
if (this.parent === injection_js_1.Injector.NULL && (token === null || token === void 0 ? void 0 : token.providedIn) === 'root') {
|
|
14
|
+
return originalGet.apply(injector, [token, token['Θfac']()]);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
return originalGet.apply(injector, [token, notFoundValue]);
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
return injector;
|
|
21
|
+
}
|
|
22
|
+
exports.resolveAndCreate = resolveAndCreate;
|
|
23
|
+
//# sourceMappingURL=injector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injector.js","sourceRoot":"","sources":["../../../../../packages/@nx-ddd/core/src/di/injector.ts"],"names":[],"mappings":";;;AAAA,+CAAkG;AAElG,6CAAkD;AAClD,6CAAwC;AAA/B,wGAAA,QAAQ,OAAA;AAGjB,SAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,uBAAQ,CAAC,IAAI;IAChE,MAAM,QAAQ,GAAG,iCAAkB,CAAC,gBAAgB,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACxE,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC;IACjC,QAAQ,CAAC,GAAG,GAAG,UAAS,KAAU,EAAE,aAAmB;QACrD,IAAA,+BAAkB,EAAC,IAAI,CAAC,CAAC;QACzB,IAAG,IAAI,CAAC,MAAM,KAAK,uBAAQ,CAAC,IAAI,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,MAAK,MAAM,EAAE;YAChE,OAAO,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;SAC9D;aAAM;YACL,OAAO,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;SAC5D;IACH,CAAC,CAAA;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAZD,4CAYC"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright Google LLC All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
6
|
+
* found in the LICENSE file at https://angular.io/license
|
|
7
|
+
*/
|
|
8
|
+
import { Type } from './type';
|
|
9
|
+
import { ClassProvider, ConstructorProvider, ExistingProvider, FactoryProvider, StaticClassProvider, ValueProvider } from './provider';
|
|
10
|
+
/**
|
|
11
|
+
* Information about how a type or `InjectionToken` interfaces with the DI system.
|
|
12
|
+
*
|
|
13
|
+
* At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
|
|
14
|
+
* requesting injection of other types if necessary.
|
|
15
|
+
*
|
|
16
|
+
* Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
|
|
17
|
+
* `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
|
|
18
|
+
* that the injectable does not belong to any scope.
|
|
19
|
+
*
|
|
20
|
+
* @codeGenApi
|
|
21
|
+
* @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
|
|
22
|
+
* deployed to npm, and should be treated as public api.
|
|
23
|
+
|
|
24
|
+
*/
|
|
25
|
+
export interface ɵɵInjectableDeclaration<T> {
|
|
26
|
+
/**
|
|
27
|
+
* Specifies that the given type belongs to a particular injector:
|
|
28
|
+
* - `InjectorType` such as `NgModule`,
|
|
29
|
+
* - `'root'` the root injector
|
|
30
|
+
* - `'any'` all injectors.
|
|
31
|
+
* - `null`, does not belong to any injector. Must be explicitly listed in the injector
|
|
32
|
+
* `providers`.
|
|
33
|
+
*/
|
|
34
|
+
providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | 'environment' | null;
|
|
35
|
+
/**
|
|
36
|
+
* The token to which this definition belongs.
|
|
37
|
+
*
|
|
38
|
+
* Note that this may not be the same as the type that the `factory` will create.
|
|
39
|
+
*/
|
|
40
|
+
token: unknown;
|
|
41
|
+
/**
|
|
42
|
+
* Factory method to execute to create an instance of the injectable.
|
|
43
|
+
*/
|
|
44
|
+
factory: (t?: Type<any>) => T;
|
|
45
|
+
/**
|
|
46
|
+
* In a case of no explicit injector, a location where the instance of the injectable is stored.
|
|
47
|
+
*/
|
|
48
|
+
value: T | undefined;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Information about the providers to be included in an `Injector` as well as how the given type
|
|
52
|
+
* which carries the information should be created by the DI system.
|
|
53
|
+
*
|
|
54
|
+
* An `InjectorDef` can import other types which have `InjectorDefs`, forming a deep nested
|
|
55
|
+
* structure of providers with a defined priority (identically to how `NgModule`s also have
|
|
56
|
+
* an import/dependency structure).
|
|
57
|
+
*
|
|
58
|
+
* NOTE: This is a private type and should not be exported
|
|
59
|
+
*
|
|
60
|
+
* @codeGenApi
|
|
61
|
+
*/
|
|
62
|
+
export interface ɵɵInjectorDef<T> {
|
|
63
|
+
providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
|
|
64
|
+
imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* A `Type` which has a `ɵprov: ɵɵInjectableDeclaration` static field.
|
|
68
|
+
*
|
|
69
|
+
* `InjectableType`s contain their own Dependency Injection metadata and are usable in an
|
|
70
|
+
* `InjectorDef`-based `StaticInjector`.
|
|
71
|
+
*
|
|
72
|
+
* @publicApi
|
|
73
|
+
*/
|
|
74
|
+
export interface InjectableType<T> extends Type<T> {
|
|
75
|
+
/**
|
|
76
|
+
* Opaque type whose structure is highly version dependent. Do not rely on any properties.
|
|
77
|
+
*/
|
|
78
|
+
ɵprov: unknown;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* A type which has an `InjectorDef` static field.
|
|
82
|
+
*
|
|
83
|
+
* `InjectorTypes` can be used to configure a `StaticInjector`.
|
|
84
|
+
*
|
|
85
|
+
* This is an opaque type whose structure is highly version dependent. Do not rely on any
|
|
86
|
+
* properties.
|
|
87
|
+
*
|
|
88
|
+
* @publicApi
|
|
89
|
+
*/
|
|
90
|
+
export interface InjectorType<T> extends Type<T> {
|
|
91
|
+
ɵfac?: unknown;
|
|
92
|
+
ɵinj: unknown;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Describes the `InjectorDef` equivalent of a `ModuleWithProviders`, an `InjectorType` with an
|
|
96
|
+
* associated array of providers.
|
|
97
|
+
*
|
|
98
|
+
* Objects of this type can be listed in the imports section of an `InjectorDef`.
|
|
99
|
+
*
|
|
100
|
+
* NOTE: This is a private type and should not be exported
|
|
101
|
+
*/
|
|
102
|
+
export interface InjectorTypeWithProviders<T> {
|
|
103
|
+
nxModule: InjectorType<T>;
|
|
104
|
+
providers?: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Construct an injectable definition which defines how a token will be constructed by the DI
|
|
108
|
+
* system, and in which injectors (if any) it will be available.
|
|
109
|
+
*
|
|
110
|
+
* This should be assigned to a static `ɵprov` field on a type, which will then be an
|
|
111
|
+
* `InjectableType`.
|
|
112
|
+
*
|
|
113
|
+
* Options:
|
|
114
|
+
* * `providedIn` determines which injectors will include the injectable, by either associating it
|
|
115
|
+
* with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
|
|
116
|
+
* provided in the `'root'` injector, which will be the application-level injector in most apps.
|
|
117
|
+
* * `factory` gives the zero argument function which will create an instance of the injectable.
|
|
118
|
+
* The factory can call `inject` to access the `Injector` and request injection of dependencies.
|
|
119
|
+
*
|
|
120
|
+
* @codeGenApi
|
|
121
|
+
* @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
|
|
122
|
+
*/
|
|
123
|
+
export declare function ɵɵdefineInjectable<T>(opts: {
|
|
124
|
+
token: unknown;
|
|
125
|
+
providedIn?: Type<any> | 'root' | 'platform' | 'any' | 'environment' | null;
|
|
126
|
+
factory: () => T;
|
|
127
|
+
}): unknown;
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated in v8, delete after v10. This API should be used only by generated code, and that
|
|
130
|
+
* code should now use ɵɵdefineInjectable instead.
|
|
131
|
+
* @publicApi
|
|
132
|
+
*/
|
|
133
|
+
export declare const defineInjectable: typeof ɵɵdefineInjectable;
|
|
134
|
+
/**
|
|
135
|
+
* Construct an `InjectorDef` which configures an injector.
|
|
136
|
+
*
|
|
137
|
+
* This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
|
|
138
|
+
* `InjectorType`.
|
|
139
|
+
*
|
|
140
|
+
* Options:
|
|
141
|
+
*
|
|
142
|
+
* * `providers`: an optional array of providers to add to the injector. Each provider must
|
|
143
|
+
* either have a factory or point to a type which has a `ɵprov` static property (the
|
|
144
|
+
* type must be an `InjectableType`).
|
|
145
|
+
* * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
|
|
146
|
+
* whose providers will also be added to the injector. Locally provided types will override
|
|
147
|
+
* providers from imports.
|
|
148
|
+
*
|
|
149
|
+
* @codeGenApi
|
|
150
|
+
*/
|
|
151
|
+
export declare function ɵɵdefineInjector(options: {
|
|
152
|
+
providers?: any[];
|
|
153
|
+
imports?: any[];
|
|
154
|
+
}): unknown;
|
|
155
|
+
/**
|
|
156
|
+
* Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
|
|
157
|
+
* inherited value.
|
|
158
|
+
*
|
|
159
|
+
* @param type A type which may have its own (non-inherited) `ɵprov`.
|
|
160
|
+
*/
|
|
161
|
+
export declare function getInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
|
|
162
|
+
/**
|
|
163
|
+
* Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.
|
|
164
|
+
*
|
|
165
|
+
* @param type A type which may have `ɵprov`, via inheritance.
|
|
166
|
+
*
|
|
167
|
+
* @deprecated Will be removed in a future version of Angular, where an error will occur in the
|
|
168
|
+
* scenario if we find the `ɵprov` on an ancestor only.
|
|
169
|
+
*/
|
|
170
|
+
export declare function getInheritedInjectableDef<T>(type: any): ɵɵInjectableDeclaration<T> | null;
|
|
171
|
+
export declare function hasInjectaorDef(type: any): boolean;
|
|
172
|
+
/**
|
|
173
|
+
* Read the injector def type in a way which is immune to accidentally reading inherited value.
|
|
174
|
+
*
|
|
175
|
+
* @param type type which may have an injector def (`ɵinj`)
|
|
176
|
+
*/
|
|
177
|
+
export declare function getInjectorDef<T>(type: any): ɵɵInjectorDef<T> | null;
|
|
178
|
+
export declare const NG_PROV_DEF: string;
|
|
179
|
+
export declare const NG_INJ_DEF: string;
|
|
180
|
+
export declare const NG_INJECTABLE_DEF: string;
|
|
181
|
+
export declare const NG_INJECTOR_DEF: string;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright Google LLC All Rights Reserved.
|
|
5
|
+
*
|
|
6
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
7
|
+
* found in the LICENSE file at https://angular.io/license
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.NG_INJECTOR_DEF = exports.NG_INJECTABLE_DEF = exports.NG_INJ_DEF = exports.NG_PROV_DEF = exports.getInjectorDef = exports.hasInjectaorDef = exports.getInheritedInjectableDef = exports.getInjectableDef = exports.ɵɵdefineInjector = exports.defineInjectable = exports.ɵɵdefineInjectable = void 0;
|
|
11
|
+
const property_1 = require("../../util/property");
|
|
12
|
+
/**
|
|
13
|
+
* Construct an injectable definition which defines how a token will be constructed by the DI
|
|
14
|
+
* system, and in which injectors (if any) it will be available.
|
|
15
|
+
*
|
|
16
|
+
* This should be assigned to a static `ɵprov` field on a type, which will then be an
|
|
17
|
+
* `InjectableType`.
|
|
18
|
+
*
|
|
19
|
+
* Options:
|
|
20
|
+
* * `providedIn` determines which injectors will include the injectable, by either associating it
|
|
21
|
+
* with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
|
|
22
|
+
* provided in the `'root'` injector, which will be the application-level injector in most apps.
|
|
23
|
+
* * `factory` gives the zero argument function which will create an instance of the injectable.
|
|
24
|
+
* The factory can call `inject` to access the `Injector` and request injection of dependencies.
|
|
25
|
+
*
|
|
26
|
+
* @codeGenApi
|
|
27
|
+
* @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
|
|
28
|
+
*/
|
|
29
|
+
function ɵɵdefineInjectable(opts) {
|
|
30
|
+
return {
|
|
31
|
+
token: opts.token,
|
|
32
|
+
providedIn: opts.providedIn || null,
|
|
33
|
+
factory: opts.factory,
|
|
34
|
+
value: undefined,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
exports.ɵɵdefineInjectable = ɵɵdefineInjectable;
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated in v8, delete after v10. This API should be used only by generated code, and that
|
|
40
|
+
* code should now use ɵɵdefineInjectable instead.
|
|
41
|
+
* @publicApi
|
|
42
|
+
*/
|
|
43
|
+
exports.defineInjectable = ɵɵdefineInjectable;
|
|
44
|
+
/**
|
|
45
|
+
* Construct an `InjectorDef` which configures an injector.
|
|
46
|
+
*
|
|
47
|
+
* This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
|
|
48
|
+
* `InjectorType`.
|
|
49
|
+
*
|
|
50
|
+
* Options:
|
|
51
|
+
*
|
|
52
|
+
* * `providers`: an optional array of providers to add to the injector. Each provider must
|
|
53
|
+
* either have a factory or point to a type which has a `ɵprov` static property (the
|
|
54
|
+
* type must be an `InjectableType`).
|
|
55
|
+
* * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
|
|
56
|
+
* whose providers will also be added to the injector. Locally provided types will override
|
|
57
|
+
* providers from imports.
|
|
58
|
+
*
|
|
59
|
+
* @codeGenApi
|
|
60
|
+
*/
|
|
61
|
+
function ɵɵdefineInjector(options) {
|
|
62
|
+
return { providers: options.providers || [], imports: options.imports || [] };
|
|
63
|
+
}
|
|
64
|
+
exports.ɵɵdefineInjector = ɵɵdefineInjector;
|
|
65
|
+
/**
|
|
66
|
+
* Read the injectable def (`ɵprov`) for `type` in a way which is immune to accidentally reading
|
|
67
|
+
* inherited value.
|
|
68
|
+
*
|
|
69
|
+
* @param type A type which may have its own (non-inherited) `ɵprov`.
|
|
70
|
+
*/
|
|
71
|
+
function getInjectableDef(type) {
|
|
72
|
+
return getOwnDefinition(type, exports.NG_PROV_DEF) || getOwnDefinition(type, exports.NG_INJECTABLE_DEF);
|
|
73
|
+
}
|
|
74
|
+
exports.getInjectableDef = getInjectableDef;
|
|
75
|
+
/**
|
|
76
|
+
* Return definition only if it is defined directly on `type` and is not inherited from a base
|
|
77
|
+
* class of `type`.
|
|
78
|
+
*/
|
|
79
|
+
function getOwnDefinition(type, field) {
|
|
80
|
+
return type.hasOwnProperty(field) ? type[field] : null;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Read the injectable def (`ɵprov`) for `type` or read the `ɵprov` from one of its ancestors.
|
|
84
|
+
*
|
|
85
|
+
* @param type A type which may have `ɵprov`, via inheritance.
|
|
86
|
+
*
|
|
87
|
+
* @deprecated Will be removed in a future version of Angular, where an error will occur in the
|
|
88
|
+
* scenario if we find the `ɵprov` on an ancestor only.
|
|
89
|
+
*/
|
|
90
|
+
function getInheritedInjectableDef(type) {
|
|
91
|
+
const def = type && (type[exports.NG_PROV_DEF] || type[exports.NG_INJECTABLE_DEF]);
|
|
92
|
+
if (def) {
|
|
93
|
+
const typeName = getTypeName(type);
|
|
94
|
+
// TODO(FW-1307): Re-add ngDevMode when closure can handle it
|
|
95
|
+
// ngDevMode &&
|
|
96
|
+
console.warn(`DEPRECATED: DI is instantiating a token "${typeName}" that inherits its @Injectable decorator but does not provide one itself.\n` +
|
|
97
|
+
`This will become an error in a future version of Angular. Please add @Injectable() to the "${typeName}" class.`);
|
|
98
|
+
return def;
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.getInheritedInjectableDef = getInheritedInjectableDef;
|
|
105
|
+
/** Gets the name of a type, accounting for some cross-browser differences. */
|
|
106
|
+
function getTypeName(type) {
|
|
107
|
+
// `Function.prototype.name` behaves differently between IE and other browsers. In most browsers
|
|
108
|
+
// it'll always return the name of the function itself, no matter how many other functions it
|
|
109
|
+
// inherits from. On IE the function doesn't have its own `name` property, but it takes it from
|
|
110
|
+
// the lowest level in the prototype chain. E.g. if we have `class Foo extends Parent` most
|
|
111
|
+
// browsers will evaluate `Foo.name` to `Foo` while IE will return `Parent`. We work around
|
|
112
|
+
// the issue by converting the function to a string and parsing its name out that way via a regex.
|
|
113
|
+
if (type.hasOwnProperty('name')) {
|
|
114
|
+
return type.name;
|
|
115
|
+
}
|
|
116
|
+
const match = ('' + type).match(/^function\s*([^\s(]+)/);
|
|
117
|
+
return match === null ? '' : match[1];
|
|
118
|
+
}
|
|
119
|
+
function hasInjectaorDef(type) {
|
|
120
|
+
return type && (type.hasOwnProperty(exports.NG_INJ_DEF) || type.hasOwnProperty(exports.NG_INJECTOR_DEF));
|
|
121
|
+
}
|
|
122
|
+
exports.hasInjectaorDef = hasInjectaorDef;
|
|
123
|
+
/**
|
|
124
|
+
* Read the injector def type in a way which is immune to accidentally reading inherited value.
|
|
125
|
+
*
|
|
126
|
+
* @param type type which may have an injector def (`ɵinj`)
|
|
127
|
+
*/
|
|
128
|
+
function getInjectorDef(type) {
|
|
129
|
+
return hasInjectaorDef(type) ? type[exports.NG_INJ_DEF] : null;
|
|
130
|
+
}
|
|
131
|
+
exports.getInjectorDef = getInjectorDef;
|
|
132
|
+
exports.NG_PROV_DEF = (0, property_1.getClosureSafeProperty)({ ɵprov: property_1.getClosureSafeProperty });
|
|
133
|
+
exports.NG_INJ_DEF = (0, property_1.getClosureSafeProperty)({ ɵinj: property_1.getClosureSafeProperty });
|
|
134
|
+
// We need to keep these around so we can read off old defs if new defs are unavailable
|
|
135
|
+
exports.NG_INJECTABLE_DEF = (0, property_1.getClosureSafeProperty)({ ngInjectableDef: property_1.getClosureSafeProperty });
|
|
136
|
+
exports.NG_INJECTOR_DEF = (0, property_1.getClosureSafeProperty)({ ngInjectorDef: property_1.getClosureSafeProperty });
|
|
137
|
+
//# sourceMappingURL=defs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defs.js","sourceRoot":"","sources":["../../../../../../packages/@nx-ddd/core/src/di/interface/defs.ts"],"names":[],"mappings":"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"}
|