inversify 6.1.4 → 6.1.5-beta.0
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/CHANGELOG.md +11 -1
- package/README.md +6 -15
- package/es/container/container.d.ts +2 -0
- package/es/container/module_activation_store.d.ts +2 -2
- package/es/interfaces/interfaces.d.ts +2 -2
- package/es/inversify.d.ts +1 -0
- package/es/inversify.js +3 -2
- package/es/inversify.js.LICENSE.txt +14 -0
- package/lib/annotation/decorator_utils.js +31 -25
- package/lib/annotation/inject.js +20 -10
- package/lib/annotation/inject_base.js +6 -6
- package/lib/annotation/injectable.js +20 -10
- package/lib/annotation/multi_inject.js +20 -10
- package/lib/annotation/named.js +20 -10
- package/lib/annotation/optional.js +20 -10
- package/lib/annotation/post_construct.js +21 -11
- package/lib/annotation/pre_destroy.js +21 -11
- package/lib/annotation/property_event_decorator.js +4 -4
- package/lib/annotation/tagged.js +2 -2
- package/lib/annotation/target_name.js +21 -11
- package/lib/annotation/unmanaged.js +21 -11
- package/lib/bindings/binding.js +23 -10
- package/lib/constants/error_msgs.js +15 -29
- package/lib/constants/literal_types.js +3 -3
- package/lib/container/container.d.ts +2 -0
- package/lib/container/container.js +317 -566
- package/lib/container/container_module.js +11 -9
- package/lib/container/container_snapshot.js +10 -8
- package/lib/container/lookup.js +61 -56
- package/lib/container/module_activation_store.d.ts +2 -2
- package/lib/container/module_activation_store.js +21 -24
- package/lib/interfaces/interfaces.d.ts +2 -2
- package/lib/inversify.d.ts +1 -0
- package/lib/inversify.js +19 -8
- package/lib/planning/context.js +12 -9
- package/lib/planning/metadata.js +27 -16
- package/lib/planning/metadata_reader.js +29 -24
- package/lib/planning/plan.js +5 -4
- package/lib/planning/planner.js +62 -53
- package/lib/planning/queryable_string.js +16 -16
- package/lib/planning/reflection_utils.js +25 -17
- package/lib/planning/request.js +15 -8
- package/lib/resolution/instantiation.js +59 -119
- package/lib/resolution/resolver.js +89 -134
- package/lib/scope/scope.js +17 -62
- package/lib/syntax/binding_in_syntax.js +12 -12
- package/lib/syntax/binding_in_when_on_syntax.js +50 -47
- package/lib/syntax/binding_on_syntax.js +9 -9
- package/lib/syntax/binding_to_syntax.js +70 -49
- package/lib/syntax/binding_when_on_syntax.js +42 -40
- package/lib/syntax/binding_when_syntax.js +54 -76
- package/lib/syntax/constraint_helpers.js +31 -23
- package/lib/utils/async.js +1 -1
- package/lib/utils/binding_utils.js +31 -29
- package/lib/utils/exceptions.js +19 -9
- package/lib/utils/id.js +1 -1
- package/lib/utils/js.js +2 -3
- package/lib/utils/serialization.js +42 -33
- package/package.json +14 -15
- package/amd/annotation/decorator_utils.d.ts +0 -16
- package/amd/annotation/decorator_utils.js +0 -119
- package/amd/annotation/inject.d.ts +0 -5
- package/amd/annotation/inject.js +0 -31
- package/amd/annotation/inject_base.d.ts +0 -4
- package/amd/annotation/inject_base.js +0 -16
- package/amd/annotation/injectable.d.ts +0 -2
- package/amd/annotation/injectable.js +0 -40
- package/amd/annotation/lazy_service_identifier.js +0 -4
- package/amd/annotation/multi_inject.d.ts +0 -5
- package/amd/annotation/multi_inject.js +0 -31
- package/amd/annotation/named.d.ts +0 -2
- package/amd/annotation/named.js +0 -32
- package/amd/annotation/optional.d.ts +0 -2
- package/amd/annotation/optional.js +0 -32
- package/amd/annotation/post_construct.d.ts +0 -4
- package/amd/annotation/post_construct.js +0 -32
- package/amd/annotation/pre_destroy.d.ts +0 -4
- package/amd/annotation/pre_destroy.js +0 -32
- package/amd/annotation/property_event_decorator.d.ts +0 -4
- package/amd/annotation/property_event_decorator.js +0 -16
- package/amd/annotation/tagged.d.ts +0 -2
- package/amd/annotation/tagged.js +0 -8
- package/amd/annotation/target_name.d.ts +0 -3
- package/amd/annotation/target_name.js +0 -35
- package/amd/annotation/unmanaged.d.ts +0 -3
- package/amd/annotation/unmanaged.js +0 -35
- package/amd/bindings/binding.d.ts +0 -20
- package/amd/bindings/binding.js +0 -40
- package/amd/bindings/binding_count.d.ts +0 -5
- package/amd/bindings/binding_count.js +0 -11
- package/amd/constants/error_msgs.d.ts +0 -30
- package/amd/constants/error_msgs.js +0 -75
- package/amd/constants/literal_types.d.ts +0 -5
- package/amd/constants/literal_types.js +0 -28
- package/amd/constants/metadata_keys.d.ts +0 -13
- package/amd/constants/metadata_keys.js +0 -28
- package/amd/container/container.d.ts +0 -73
- package/amd/container/container.js +0 -766
- package/amd/container/container_module.d.ts +0 -11
- package/amd/container/container_module.js +0 -21
- package/amd/container/container_snapshot.d.ts +0 -10
- package/amd/container/container_snapshot.js +0 -20
- package/amd/container/lookup.d.ts +0 -17
- package/amd/container/lookup.js +0 -132
- package/amd/container/module_activation_store.d.ts +0 -10
- package/amd/container/module_activation_store.js +0 -51
- package/amd/interfaces/interfaces.d.ts +0 -269
- package/amd/interfaces/interfaces.js +0 -4
- package/amd/inversify.d.ts +0 -24
- package/amd/inversify.js +0 -57
- package/amd/planning/context.d.ts +0 -11
- package/amd/planning/context.js +0 -19
- package/amd/planning/metadata.d.ts +0 -8
- package/amd/planning/metadata.js +0 -45
- package/amd/planning/metadata_reader.d.ts +0 -6
- package/amd/planning/metadata_reader.js +0 -49
- package/amd/planning/plan.d.ts +0 -7
- package/amd/planning/plan.js +0 -13
- package/amd/planning/planner.d.ts +0 -5
- package/amd/planning/planner.js +0 -187
- package/amd/planning/queryable_string.d.ts +0 -10
- package/amd/planning/queryable_string.js +0 -33
- package/amd/planning/reflection_utils.d.ts +0 -5
- package/amd/planning/reflection_utils.js +0 -55
- package/amd/planning/request.d.ts +0 -14
- package/amd/planning/request.js +0 -24
- package/amd/planning/target.js +0 -111
- package/amd/resolution/instantiation.d.ts +0 -3
- package/amd/resolution/instantiation.js +0 -219
- package/amd/resolution/resolver.d.ts +0 -3
- package/amd/resolution/resolver.js +0 -234
- package/amd/scope/scope.d.ts +0 -3
- package/amd/scope/scope.js +0 -93
- package/amd/syntax/binding_in_syntax.d.ts +0 -9
- package/amd/syntax/binding_in_syntax.js +0 -24
- package/amd/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/amd/syntax/binding_in_when_on_syntax.js +0 -75
- package/amd/syntax/binding_on_syntax.d.ts +0 -8
- package/amd/syntax/binding_on_syntax.js +0 -20
- package/amd/syntax/binding_to_syntax.d.ts +0 -18
- package/amd/syntax/binding_to_syntax.js +0 -116
- package/amd/syntax/binding_when_on_syntax.d.ts +0 -25
- package/amd/syntax/binding_when_on_syntax.js +0 -65
- package/amd/syntax/binding_when_syntax.d.ts +0 -21
- package/amd/syntax/binding_when_syntax.js +0 -107
- package/amd/syntax/constraint_helpers.d.ts +0 -6
- package/amd/syntax/constraint_helpers.js +0 -66
- package/amd/utils/async.d.ts +0 -3
- package/amd/utils/async.js +0 -17
- package/amd/utils/binding_utils.d.ts +0 -4
- package/amd/utils/binding_utils.js +0 -86
- package/amd/utils/clonable.d.ts +0 -3
- package/amd/utils/clonable.js +0 -11
- package/amd/utils/exceptions.d.ts +0 -2
- package/amd/utils/exceptions.js +0 -46
- package/amd/utils/factory_type.d.ts +0 -5
- package/amd/utils/factory_type.js +0 -11
- package/amd/utils/id.d.ts +0 -2
- package/amd/utils/id.js +0 -9
- package/amd/utils/js.d.ts +0 -1
- package/amd/utils/js.js +0 -18
- package/amd/utils/serialization.d.ts +0 -10
- package/amd/utils/serialization.js +0 -135
- package/es6/annotation/decorator_utils.d.ts +0 -16
- package/es6/annotation/decorator_utils.js +0 -114
- package/es6/annotation/inject.d.ts +0 -5
- package/es6/annotation/inject.js +0 -30
- package/es6/annotation/inject_base.d.ts +0 -4
- package/es6/annotation/inject_base.js +0 -17
- package/es6/annotation/injectable.d.ts +0 -2
- package/es6/annotation/injectable.js +0 -38
- package/es6/annotation/lazy_service_identifier.js +0 -2
- package/es6/annotation/multi_inject.d.ts +0 -5
- package/es6/annotation/multi_inject.js +0 -30
- package/es6/annotation/named.d.ts +0 -2
- package/es6/annotation/named.js +0 -32
- package/es6/annotation/optional.d.ts +0 -2
- package/es6/annotation/optional.js +0 -32
- package/es6/annotation/post_construct.d.ts +0 -4
- package/es6/annotation/post_construct.js +0 -31
- package/es6/annotation/pre_destroy.d.ts +0 -4
- package/es6/annotation/pre_destroy.js +0 -31
- package/es6/annotation/property_event_decorator.d.ts +0 -4
- package/es6/annotation/property_event_decorator.js +0 -15
- package/es6/annotation/tagged.d.ts +0 -2
- package/es6/annotation/tagged.js +0 -8
- package/es6/annotation/target_name.d.ts +0 -3
- package/es6/annotation/target_name.js +0 -35
- package/es6/annotation/unmanaged.d.ts +0 -3
- package/es6/annotation/unmanaged.js +0 -35
- package/es6/bindings/binding.d.ts +0 -20
- package/es6/bindings/binding.js +0 -39
- package/es6/bindings/binding_count.d.ts +0 -5
- package/es6/bindings/binding_count.js +0 -9
- package/es6/constants/error_msgs.d.ts +0 -30
- package/es6/constants/error_msgs.js +0 -59
- package/es6/constants/literal_types.d.ts +0 -5
- package/es6/constants/literal_types.js +0 -26
- package/es6/constants/metadata_keys.d.ts +0 -13
- package/es6/constants/metadata_keys.js +0 -26
- package/es6/container/container.d.ts +0 -73
- package/es6/container/container.js +0 -545
- package/es6/container/container_module.d.ts +0 -11
- package/es6/container/container_module.js +0 -18
- package/es6/container/container_snapshot.d.ts +0 -10
- package/es6/container/container_snapshot.js +0 -15
- package/es6/container/lookup.d.ts +0 -17
- package/es6/container/lookup.js +0 -125
- package/es6/container/module_activation_store.d.ts +0 -10
- package/es6/container/module_activation_store.js +0 -49
- package/es6/interfaces/interfaces.d.ts +0 -269
- package/es6/interfaces/interfaces.js +0 -2
- package/es6/inversify.d.ts +0 -24
- package/es6/inversify.js +0 -76
- package/es6/planning/context.d.ts +0 -11
- package/es6/planning/context.js +0 -17
- package/es6/planning/metadata.d.ts +0 -8
- package/es6/planning/metadata.js +0 -42
- package/es6/planning/metadata_reader.d.ts +0 -6
- package/es6/planning/metadata_reader.js +0 -44
- package/es6/planning/plan.d.ts +0 -7
- package/es6/planning/plan.js +0 -10
- package/es6/planning/planner.d.ts +0 -5
- package/es6/planning/planner.js +0 -194
- package/es6/planning/queryable_string.d.ts +0 -10
- package/es6/planning/queryable_string.js +0 -30
- package/es6/planning/reflection_utils.d.ts +0 -5
- package/es6/planning/reflection_utils.js +0 -53
- package/es6/planning/request.d.ts +0 -14
- package/es6/planning/request.js +0 -22
- package/es6/planning/target.js +0 -105
- package/es6/resolution/instantiation.d.ts +0 -3
- package/es6/resolution/instantiation.js +0 -158
- package/es6/resolution/resolver.d.ts +0 -3
- package/es6/resolution/resolver.js +0 -193
- package/es6/scope/scope.d.ts +0 -3
- package/es6/scope/scope.js +0 -57
- package/es6/syntax/binding_in_syntax.d.ts +0 -9
- package/es6/syntax/binding_in_syntax.js +0 -23
- package/es6/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/es6/syntax/binding_in_when_on_syntax.js +0 -75
- package/es6/syntax/binding_on_syntax.d.ts +0 -8
- package/es6/syntax/binding_on_syntax.js +0 -18
- package/es6/syntax/binding_to_syntax.d.ts +0 -18
- package/es6/syntax/binding_to_syntax.js +0 -110
- package/es6/syntax/binding_when_on_syntax.d.ts +0 -25
- package/es6/syntax/binding_when_on_syntax.js +0 -64
- package/es6/syntax/binding_when_syntax.d.ts +0 -21
- package/es6/syntax/binding_when_syntax.js +0 -84
- package/es6/syntax/constraint_helpers.d.ts +0 -6
- package/es6/syntax/constraint_helpers.js +0 -63
- package/es6/utils/async.d.ts +0 -3
- package/es6/utils/async.js +0 -15
- package/es6/utils/binding_utils.d.ts +0 -4
- package/es6/utils/binding_utils.js +0 -79
- package/es6/utils/clonable.d.ts +0 -3
- package/es6/utils/clonable.js +0 -9
- package/es6/utils/exceptions.d.ts +0 -2
- package/es6/utils/exceptions.js +0 -44
- package/es6/utils/factory_type.d.ts +0 -5
- package/es6/utils/factory_type.js +0 -9
- package/es6/utils/id.d.ts +0 -2
- package/es6/utils/id.js +0 -7
- package/es6/utils/js.d.ts +0 -1
- package/es6/utils/js.js +0 -15
- package/es6/utils/serialization.d.ts +0 -10
- package/es6/utils/serialization.js +0 -132
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/error_msgs", "../constants/metadata_keys", "./property_event_decorator"], function (require, exports, ERRORS_MSGS, METADATA_KEY, property_event_decorator_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.postConstruct = void 0;
|
|
28
|
-
ERRORS_MSGS = __importStar(ERRORS_MSGS);
|
|
29
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
30
|
-
var postConstruct = (0, property_event_decorator_1.propertyEventDecorator)(METADATA_KEY.POST_CONSTRUCT, ERRORS_MSGS.MULTIPLE_POST_CONSTRUCT_METHODS);
|
|
31
|
-
exports.postConstruct = postConstruct;
|
|
32
|
-
});
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/error_msgs", "../constants/metadata_keys", "./property_event_decorator"], function (require, exports, ERRORS_MSGS, METADATA_KEY, property_event_decorator_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.preDestroy = void 0;
|
|
28
|
-
ERRORS_MSGS = __importStar(ERRORS_MSGS);
|
|
29
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
30
|
-
var preDestroy = (0, property_event_decorator_1.propertyEventDecorator)(METADATA_KEY.PRE_DESTROY, ERRORS_MSGS.MULTIPLE_PRE_DESTROY_METHODS);
|
|
31
|
-
exports.preDestroy = preDestroy;
|
|
32
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "../planning/metadata"], function (require, exports, metadata_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.propertyEventDecorator = propertyEventDecorator;
|
|
5
|
-
function propertyEventDecorator(eventKey, errorMessage) {
|
|
6
|
-
return function () {
|
|
7
|
-
return function (target, propertyKey) {
|
|
8
|
-
var metadata = new metadata_1.Metadata(eventKey, propertyKey);
|
|
9
|
-
if (Reflect.hasOwnMetadata(eventKey, target.constructor)) {
|
|
10
|
-
throw new Error(errorMessage);
|
|
11
|
-
}
|
|
12
|
-
Reflect.defineMetadata(eventKey, metadata, target.constructor);
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
});
|
package/amd/annotation/tagged.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "../planning/metadata", "./decorator_utils"], function (require, exports, metadata_1, decorator_utils_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.tagged = tagged;
|
|
5
|
-
function tagged(metadataKey, metadataValue) {
|
|
6
|
-
return (0, decorator_utils_1.createTaggedDecorator)(new metadata_1.Metadata(metadataKey, metadataValue));
|
|
7
|
-
}
|
|
8
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/metadata_keys", "../planning/metadata", "./decorator_utils"], function (require, exports, METADATA_KEY, metadata_1, decorator_utils_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.targetName = targetName;
|
|
28
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
29
|
-
function targetName(name) {
|
|
30
|
-
return function (target, targetKey, index) {
|
|
31
|
-
var metadata = new metadata_1.Metadata(METADATA_KEY.NAME_TAG, name);
|
|
32
|
-
(0, decorator_utils_1.tagParameter)(target, targetKey, index, metadata);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
});
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
2
|
-
if (k2 === undefined) k2 = k;
|
|
3
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
5
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
6
|
-
}
|
|
7
|
-
Object.defineProperty(o, k2, desc);
|
|
8
|
-
}) : (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
o[k2] = m[k];
|
|
11
|
-
}));
|
|
12
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
13
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
14
|
-
}) : function(o, v) {
|
|
15
|
-
o["default"] = v;
|
|
16
|
-
});
|
|
17
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
18
|
-
if (mod && mod.__esModule) return mod;
|
|
19
|
-
var result = {};
|
|
20
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
21
|
-
__setModuleDefault(result, mod);
|
|
22
|
-
return result;
|
|
23
|
-
};
|
|
24
|
-
define(["require", "exports", "../constants/metadata_keys", "../planning/metadata", "./decorator_utils"], function (require, exports, METADATA_KEY, metadata_1, decorator_utils_1) {
|
|
25
|
-
"use strict";
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.unmanaged = unmanaged;
|
|
28
|
-
METADATA_KEY = __importStar(METADATA_KEY);
|
|
29
|
-
function unmanaged() {
|
|
30
|
-
return function (target, targetKey, index) {
|
|
31
|
-
var metadata = new metadata_1.Metadata(METADATA_KEY.UNMANAGED_TAG, true);
|
|
32
|
-
(0, decorator_utils_1.tagParameter)(target, targetKey, index, metadata);
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class Binding<TActivated> implements interfaces.Binding<TActivated> {
|
|
3
|
-
id: number;
|
|
4
|
-
moduleId: interfaces.ContainerModuleBase['id'];
|
|
5
|
-
activated: boolean;
|
|
6
|
-
serviceIdentifier: interfaces.ServiceIdentifier<TActivated>;
|
|
7
|
-
implementationType: interfaces.Newable<TActivated> | TActivated | null;
|
|
8
|
-
cache: TActivated | Promise<TActivated> | null;
|
|
9
|
-
dynamicValue: interfaces.DynamicValue<TActivated> | null;
|
|
10
|
-
scope: interfaces.BindingScope;
|
|
11
|
-
type: interfaces.BindingType;
|
|
12
|
-
factory: interfaces.FactoryCreator<unknown> | null;
|
|
13
|
-
provider: interfaces.ProviderCreator<unknown> | null;
|
|
14
|
-
constraint: interfaces.ConstraintFunction;
|
|
15
|
-
onActivation: interfaces.BindingActivation<TActivated> | null;
|
|
16
|
-
onDeactivation: interfaces.BindingDeactivation<TActivated> | null;
|
|
17
|
-
constructor(serviceIdentifier: interfaces.ServiceIdentifier<TActivated>, scope: interfaces.BindingScope);
|
|
18
|
-
clone(): interfaces.Binding<TActivated>;
|
|
19
|
-
}
|
|
20
|
-
export { Binding };
|
package/amd/bindings/binding.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
define(["require", "exports", "../constants/literal_types", "../utils/id"], function (require, exports, literal_types_1, id_1) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Binding = void 0;
|
|
5
|
-
var Binding = (function () {
|
|
6
|
-
function Binding(serviceIdentifier, scope) {
|
|
7
|
-
this.id = (0, id_1.id)();
|
|
8
|
-
this.activated = false;
|
|
9
|
-
this.serviceIdentifier = serviceIdentifier;
|
|
10
|
-
this.scope = scope;
|
|
11
|
-
this.type = literal_types_1.BindingTypeEnum.Invalid;
|
|
12
|
-
this.constraint = function (_request) { return true; };
|
|
13
|
-
this.implementationType = null;
|
|
14
|
-
this.cache = null;
|
|
15
|
-
this.factory = null;
|
|
16
|
-
this.provider = null;
|
|
17
|
-
this.onActivation = null;
|
|
18
|
-
this.onDeactivation = null;
|
|
19
|
-
this.dynamicValue = null;
|
|
20
|
-
}
|
|
21
|
-
Binding.prototype.clone = function () {
|
|
22
|
-
var clone = new Binding(this.serviceIdentifier, this.scope);
|
|
23
|
-
clone.activated =
|
|
24
|
-
clone.scope === literal_types_1.BindingScopeEnum.Singleton ? this.activated : false;
|
|
25
|
-
clone.implementationType = this.implementationType;
|
|
26
|
-
clone.dynamicValue = this.dynamicValue;
|
|
27
|
-
clone.scope = this.scope;
|
|
28
|
-
clone.type = this.type;
|
|
29
|
-
clone.factory = this.factory;
|
|
30
|
-
clone.provider = this.provider;
|
|
31
|
-
clone.constraint = this.constraint;
|
|
32
|
-
clone.onActivation = this.onActivation;
|
|
33
|
-
clone.onDeactivation = this.onDeactivation;
|
|
34
|
-
clone.cache = this.cache;
|
|
35
|
-
return clone;
|
|
36
|
-
};
|
|
37
|
-
return Binding;
|
|
38
|
-
}());
|
|
39
|
-
exports.Binding = Binding;
|
|
40
|
-
});
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.BindingCount = void 0;
|
|
5
|
-
var BindingCount;
|
|
6
|
-
(function (BindingCount) {
|
|
7
|
-
BindingCount[BindingCount["MultipleBindingsAvailable"] = 2] = "MultipleBindingsAvailable";
|
|
8
|
-
BindingCount[BindingCount["NoBindingsAvailable"] = 0] = "NoBindingsAvailable";
|
|
9
|
-
BindingCount[BindingCount["OnlyOneBindingAvailable"] = 1] = "OnlyOneBindingAvailable";
|
|
10
|
-
})(BindingCount || (exports.BindingCount = BindingCount = {}));
|
|
11
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export declare const DUPLICATED_INJECTABLE_DECORATOR: string;
|
|
2
|
-
export declare const DUPLICATED_METADATA: string;
|
|
3
|
-
export declare const NULL_ARGUMENT: string;
|
|
4
|
-
export declare const KEY_NOT_FOUND: string;
|
|
5
|
-
export declare const AMBIGUOUS_MATCH: string;
|
|
6
|
-
export declare const CANNOT_UNBIND: string;
|
|
7
|
-
export declare const NOT_REGISTERED: string;
|
|
8
|
-
export declare const TRYING_TO_RESOLVE_BINDINGS: (name: string) => string;
|
|
9
|
-
export declare const UNDEFINED_INJECT_ANNOTATION: (name: string) => string;
|
|
10
|
-
export declare const CIRCULAR_DEPENDENCY: string;
|
|
11
|
-
export declare const INVALID_BINDING_TYPE: string;
|
|
12
|
-
export declare const NO_MORE_SNAPSHOTS_AVAILABLE: string;
|
|
13
|
-
export declare const INVALID_MIDDLEWARE_RETURN: string;
|
|
14
|
-
export declare const INVALID_FUNCTION_BINDING: string;
|
|
15
|
-
export declare const LAZY_IN_SYNC: (key: unknown) => string;
|
|
16
|
-
export declare const INVALID_TO_SELF_VALUE: string;
|
|
17
|
-
export declare const INVALID_DECORATOR_OPERATION: string;
|
|
18
|
-
export declare const ARGUMENTS_LENGTH_MISMATCH: (name: string) => string;
|
|
19
|
-
export declare const CONTAINER_OPTIONS_MUST_BE_AN_OBJECT: string;
|
|
20
|
-
export declare const CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE: string;
|
|
21
|
-
export declare const CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE: string;
|
|
22
|
-
export declare const CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK: string;
|
|
23
|
-
export declare const MULTIPLE_PRE_DESTROY_METHODS: string;
|
|
24
|
-
export declare const MULTIPLE_POST_CONSTRUCT_METHODS: string;
|
|
25
|
-
export declare const ASYNC_UNBIND_REQUIRED: string;
|
|
26
|
-
export declare const POST_CONSTRUCT_ERROR: (clazz: string, errorMessage: string) => string;
|
|
27
|
-
export declare const PRE_DESTROY_ERROR: (clazz: string, errorMessage: string) => string;
|
|
28
|
-
export declare const ON_DEACTIVATION_ERROR: (clazz: string, errorMessage: string) => string;
|
|
29
|
-
export declare const CIRCULAR_DEPENDENCY_IN_FACTORY: (factoryType: string, serviceIdentifier: string) => string;
|
|
30
|
-
export declare const STACK_OVERFLOW: string;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.STACK_OVERFLOW = exports.CIRCULAR_DEPENDENCY_IN_FACTORY = exports.ON_DEACTIVATION_ERROR = exports.PRE_DESTROY_ERROR = exports.POST_CONSTRUCT_ERROR = exports.ASYNC_UNBIND_REQUIRED = exports.MULTIPLE_POST_CONSTRUCT_METHODS = exports.MULTIPLE_PRE_DESTROY_METHODS = exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = exports.ARGUMENTS_LENGTH_MISMATCH = exports.INVALID_DECORATOR_OPERATION = exports.INVALID_TO_SELF_VALUE = exports.LAZY_IN_SYNC = exports.INVALID_FUNCTION_BINDING = exports.INVALID_MIDDLEWARE_RETURN = exports.NO_MORE_SNAPSHOTS_AVAILABLE = exports.INVALID_BINDING_TYPE = exports.CIRCULAR_DEPENDENCY = exports.UNDEFINED_INJECT_ANNOTATION = exports.TRYING_TO_RESOLVE_BINDINGS = exports.NOT_REGISTERED = exports.CANNOT_UNBIND = exports.AMBIGUOUS_MATCH = exports.KEY_NOT_FOUND = exports.NULL_ARGUMENT = exports.DUPLICATED_METADATA = exports.DUPLICATED_INJECTABLE_DECORATOR = void 0;
|
|
5
|
-
exports.DUPLICATED_INJECTABLE_DECORATOR = 'Cannot apply @injectable decorator multiple times.';
|
|
6
|
-
exports.DUPLICATED_METADATA = 'Metadata key was used more than once in a parameter:';
|
|
7
|
-
exports.NULL_ARGUMENT = 'NULL argument';
|
|
8
|
-
exports.KEY_NOT_FOUND = 'Key Not Found';
|
|
9
|
-
exports.AMBIGUOUS_MATCH = 'Ambiguous match found for serviceIdentifier:';
|
|
10
|
-
exports.CANNOT_UNBIND = 'Could not unbind serviceIdentifier:';
|
|
11
|
-
exports.NOT_REGISTERED = 'No matching bindings found for serviceIdentifier:';
|
|
12
|
-
var TRYING_TO_RESOLVE_BINDINGS = function (name) { return "Trying to resolve bindings for \"".concat(name, "\""); };
|
|
13
|
-
exports.TRYING_TO_RESOLVE_BINDINGS = TRYING_TO_RESOLVE_BINDINGS;
|
|
14
|
-
var UNDEFINED_INJECT_ANNOTATION = function (name) {
|
|
15
|
-
return "@inject called with undefined this could mean that the class ".concat(name, " has ") +
|
|
16
|
-
'a circular dependency problem. You can use a LazyServiceIdentifer to ' +
|
|
17
|
-
'overcome this limitation.';
|
|
18
|
-
};
|
|
19
|
-
exports.UNDEFINED_INJECT_ANNOTATION = UNDEFINED_INJECT_ANNOTATION;
|
|
20
|
-
exports.CIRCULAR_DEPENDENCY = 'Circular dependency found:';
|
|
21
|
-
exports.INVALID_BINDING_TYPE = 'Invalid binding type:';
|
|
22
|
-
exports.NO_MORE_SNAPSHOTS_AVAILABLE = 'No snapshot available to restore.';
|
|
23
|
-
exports.INVALID_MIDDLEWARE_RETURN = 'Invalid return type in middleware. Middleware must return!';
|
|
24
|
-
exports.INVALID_FUNCTION_BINDING = 'Value provided to function binding must be a function!';
|
|
25
|
-
var LAZY_IN_SYNC = function (key) {
|
|
26
|
-
return "You are attempting to construct ".concat(keyToString(key), " in a synchronous way ") +
|
|
27
|
-
'but it has asynchronous dependencies.';
|
|
28
|
-
};
|
|
29
|
-
exports.LAZY_IN_SYNC = LAZY_IN_SYNC;
|
|
30
|
-
exports.INVALID_TO_SELF_VALUE = 'The toSelf function can only be applied when a constructor is ' +
|
|
31
|
-
'used as service identifier';
|
|
32
|
-
exports.INVALID_DECORATOR_OPERATION = 'The @inject @multiInject @tagged and @named decorators ' +
|
|
33
|
-
'must be applied to the parameters of a class constructor or a class property.';
|
|
34
|
-
var ARGUMENTS_LENGTH_MISMATCH = function (name) {
|
|
35
|
-
return 'The number of constructor arguments in the derived class ' +
|
|
36
|
-
"".concat(name, " must be >= than the number of constructor arguments of its base class.");
|
|
37
|
-
};
|
|
38
|
-
exports.ARGUMENTS_LENGTH_MISMATCH = ARGUMENTS_LENGTH_MISMATCH;
|
|
39
|
-
exports.CONTAINER_OPTIONS_MUST_BE_AN_OBJECT = 'Invalid Container constructor argument. Container options ' +
|
|
40
|
-
'must be an object.';
|
|
41
|
-
exports.CONTAINER_OPTIONS_INVALID_DEFAULT_SCOPE = 'Invalid Container option. Default scope must ' +
|
|
42
|
-
'be a string ("singleton" or "transient").';
|
|
43
|
-
exports.CONTAINER_OPTIONS_INVALID_AUTO_BIND_INJECTABLE = 'Invalid Container option. Auto bind injectable must ' + 'be a boolean';
|
|
44
|
-
exports.CONTAINER_OPTIONS_INVALID_SKIP_BASE_CHECK = 'Invalid Container option. Skip base check must ' + 'be a boolean';
|
|
45
|
-
exports.MULTIPLE_PRE_DESTROY_METHODS = 'Cannot apply @preDestroy decorator multiple times in the same class';
|
|
46
|
-
exports.MULTIPLE_POST_CONSTRUCT_METHODS = 'Cannot apply @postConstruct decorator multiple times in the same class';
|
|
47
|
-
exports.ASYNC_UNBIND_REQUIRED = 'Attempting to unbind dependency with asynchronous destruction (@preDestroy or onDeactivation)';
|
|
48
|
-
var POST_CONSTRUCT_ERROR = function (clazz, errorMessage) {
|
|
49
|
-
return "@postConstruct error in class ".concat(clazz, ": ").concat(errorMessage);
|
|
50
|
-
};
|
|
51
|
-
exports.POST_CONSTRUCT_ERROR = POST_CONSTRUCT_ERROR;
|
|
52
|
-
var PRE_DESTROY_ERROR = function (clazz, errorMessage) {
|
|
53
|
-
return "@preDestroy error in class ".concat(clazz, ": ").concat(errorMessage);
|
|
54
|
-
};
|
|
55
|
-
exports.PRE_DESTROY_ERROR = PRE_DESTROY_ERROR;
|
|
56
|
-
var ON_DEACTIVATION_ERROR = function (clazz, errorMessage) {
|
|
57
|
-
return "onDeactivation() error in class ".concat(clazz, ": ").concat(errorMessage);
|
|
58
|
-
};
|
|
59
|
-
exports.ON_DEACTIVATION_ERROR = ON_DEACTIVATION_ERROR;
|
|
60
|
-
var CIRCULAR_DEPENDENCY_IN_FACTORY = function (factoryType, serviceIdentifier) {
|
|
61
|
-
return "It looks like there is a circular dependency in one of the '".concat(factoryType, "' bindings. Please investigate bindings with ") +
|
|
62
|
-
"service identifier '".concat(serviceIdentifier, "'.");
|
|
63
|
-
};
|
|
64
|
-
exports.CIRCULAR_DEPENDENCY_IN_FACTORY = CIRCULAR_DEPENDENCY_IN_FACTORY;
|
|
65
|
-
exports.STACK_OVERFLOW = 'Maximum call stack size exceeded';
|
|
66
|
-
function keyToString(key) {
|
|
67
|
-
if (typeof key === 'function') {
|
|
68
|
-
return "[function/class ".concat(key.name || '<anonymous>', "]");
|
|
69
|
-
}
|
|
70
|
-
if (typeof key === 'symbol') {
|
|
71
|
-
return key.toString();
|
|
72
|
-
}
|
|
73
|
-
return "'".concat(key, "'");
|
|
74
|
-
}
|
|
75
|
-
});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare const BindingScopeEnum: interfaces.BindingScopeEnum;
|
|
3
|
-
declare const BindingTypeEnum: interfaces.BindingTypeEnum;
|
|
4
|
-
declare const TargetTypeEnum: interfaces.TargetTypeEnum;
|
|
5
|
-
export { BindingScopeEnum, BindingTypeEnum, TargetTypeEnum };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.TargetTypeEnum = exports.BindingTypeEnum = exports.BindingScopeEnum = void 0;
|
|
5
|
-
var BindingScopeEnum = {
|
|
6
|
-
Request: 'Request',
|
|
7
|
-
Singleton: 'Singleton',
|
|
8
|
-
Transient: 'Transient',
|
|
9
|
-
};
|
|
10
|
-
exports.BindingScopeEnum = BindingScopeEnum;
|
|
11
|
-
var BindingTypeEnum = {
|
|
12
|
-
ConstantValue: 'ConstantValue',
|
|
13
|
-
Constructor: 'Constructor',
|
|
14
|
-
DynamicValue: 'DynamicValue',
|
|
15
|
-
Factory: 'Factory',
|
|
16
|
-
Function: 'Function',
|
|
17
|
-
Instance: 'Instance',
|
|
18
|
-
Invalid: 'Invalid',
|
|
19
|
-
Provider: 'Provider',
|
|
20
|
-
};
|
|
21
|
-
exports.BindingTypeEnum = BindingTypeEnum;
|
|
22
|
-
var TargetTypeEnum = {
|
|
23
|
-
ClassProperty: 'ClassProperty',
|
|
24
|
-
ConstructorArgument: 'ConstructorArgument',
|
|
25
|
-
Variable: 'Variable',
|
|
26
|
-
};
|
|
27
|
-
exports.TargetTypeEnum = TargetTypeEnum;
|
|
28
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const NAMED_TAG: string;
|
|
2
|
-
export declare const NAME_TAG: string;
|
|
3
|
-
export declare const UNMANAGED_TAG: string;
|
|
4
|
-
export declare const OPTIONAL_TAG: string;
|
|
5
|
-
export declare const INJECT_TAG: string;
|
|
6
|
-
export declare const MULTI_INJECT_TAG: string;
|
|
7
|
-
export declare const TAGGED: string;
|
|
8
|
-
export declare const TAGGED_PROP: string;
|
|
9
|
-
export declare const PARAM_TYPES: string;
|
|
10
|
-
export declare const DESIGN_PARAM_TYPES: string;
|
|
11
|
-
export declare const POST_CONSTRUCT: string;
|
|
12
|
-
export declare const PRE_DESTROY: string;
|
|
13
|
-
export declare const NON_CUSTOM_TAG_KEYS: string[];
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
define(["require", "exports"], function (require, exports) {
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.NON_CUSTOM_TAG_KEYS = exports.PRE_DESTROY = exports.POST_CONSTRUCT = exports.DESIGN_PARAM_TYPES = exports.PARAM_TYPES = exports.TAGGED_PROP = exports.TAGGED = exports.MULTI_INJECT_TAG = exports.INJECT_TAG = exports.OPTIONAL_TAG = exports.UNMANAGED_TAG = exports.NAME_TAG = exports.NAMED_TAG = void 0;
|
|
5
|
-
exports.NAMED_TAG = 'named';
|
|
6
|
-
exports.NAME_TAG = 'name';
|
|
7
|
-
exports.UNMANAGED_TAG = 'unmanaged';
|
|
8
|
-
exports.OPTIONAL_TAG = 'optional';
|
|
9
|
-
exports.INJECT_TAG = 'inject';
|
|
10
|
-
exports.MULTI_INJECT_TAG = 'multi_inject';
|
|
11
|
-
exports.TAGGED = 'inversify:tagged';
|
|
12
|
-
exports.TAGGED_PROP = 'inversify:tagged_props';
|
|
13
|
-
exports.PARAM_TYPES = 'inversify:paramtypes';
|
|
14
|
-
exports.DESIGN_PARAM_TYPES = 'design:paramtypes';
|
|
15
|
-
exports.POST_CONSTRUCT = 'post_construct';
|
|
16
|
-
exports.PRE_DESTROY = 'pre_destroy';
|
|
17
|
-
function getNonCustomTagKeys() {
|
|
18
|
-
return [
|
|
19
|
-
exports.INJECT_TAG,
|
|
20
|
-
exports.MULTI_INJECT_TAG,
|
|
21
|
-
exports.NAME_TAG,
|
|
22
|
-
exports.UNMANAGED_TAG,
|
|
23
|
-
exports.NAMED_TAG,
|
|
24
|
-
exports.OPTIONAL_TAG,
|
|
25
|
-
];
|
|
26
|
-
}
|
|
27
|
-
exports.NON_CUSTOM_TAG_KEYS = getNonCustomTagKeys();
|
|
28
|
-
});
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class Container implements interfaces.Container {
|
|
3
|
-
id: number;
|
|
4
|
-
parent: interfaces.Container | null;
|
|
5
|
-
readonly options: interfaces.ContainerOptions;
|
|
6
|
-
private _middleware;
|
|
7
|
-
private _bindingDictionary;
|
|
8
|
-
private _activations;
|
|
9
|
-
private _deactivations;
|
|
10
|
-
private readonly _snapshots;
|
|
11
|
-
private _metadataReader;
|
|
12
|
-
private _moduleActivationStore;
|
|
13
|
-
constructor(containerOptions?: interfaces.ContainerOptions);
|
|
14
|
-
static merge(container1: interfaces.Container, container2: interfaces.Container, ...containers: interfaces.Container[]): interfaces.Container;
|
|
15
|
-
load(...modules: interfaces.ContainerModule[]): void;
|
|
16
|
-
loadAsync(...modules: interfaces.AsyncContainerModule[]): Promise<void>;
|
|
17
|
-
unload(...modules: interfaces.ContainerModuleBase[]): void;
|
|
18
|
-
unloadAsync(...modules: interfaces.ContainerModuleBase[]): Promise<void>;
|
|
19
|
-
bind<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): interfaces.BindingToSyntax<T>;
|
|
20
|
-
rebind<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): interfaces.BindingToSyntax<T>;
|
|
21
|
-
rebindAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<interfaces.BindingToSyntax<T>>;
|
|
22
|
-
unbind(serviceIdentifier: interfaces.ServiceIdentifier): void;
|
|
23
|
-
unbindAsync(serviceIdentifier: interfaces.ServiceIdentifier): Promise<void>;
|
|
24
|
-
unbindAll(): void;
|
|
25
|
-
unbindAllAsync(): Promise<void>;
|
|
26
|
-
onActivation<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, onActivation: interfaces.BindingActivation<T>): void;
|
|
27
|
-
onDeactivation<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, onDeactivation: interfaces.BindingDeactivation<T>): void;
|
|
28
|
-
isBound(serviceIdentifier: interfaces.ServiceIdentifier<unknown>): boolean;
|
|
29
|
-
isCurrentBound<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): boolean;
|
|
30
|
-
isBoundNamed(serviceIdentifier: interfaces.ServiceIdentifier, named: string | number | symbol): boolean;
|
|
31
|
-
isBoundTagged(serviceIdentifier: interfaces.ServiceIdentifier, key: string | number | symbol, value: unknown): boolean;
|
|
32
|
-
snapshot(): void;
|
|
33
|
-
restore(): void;
|
|
34
|
-
createChild(containerOptions?: interfaces.ContainerOptions): Container;
|
|
35
|
-
applyMiddleware(...middlewares: interfaces.Middleware[]): void;
|
|
36
|
-
applyCustomMetadataReader(metadataReader: interfaces.MetadataReader): void;
|
|
37
|
-
get<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T;
|
|
38
|
-
getAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<T>;
|
|
39
|
-
getTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T;
|
|
40
|
-
getTaggedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T>;
|
|
41
|
-
getNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T;
|
|
42
|
-
getNamedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): Promise<T>;
|
|
43
|
-
getAll<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): T[];
|
|
44
|
-
getAllAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>): Promise<T[]>;
|
|
45
|
-
getAllTagged<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): T[];
|
|
46
|
-
getAllTaggedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, key: string | number | symbol, value: unknown): Promise<T[]>;
|
|
47
|
-
getAllNamed<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): T[];
|
|
48
|
-
getAllNamedAsync<T>(serviceIdentifier: interfaces.ServiceIdentifier<T>, named: string | number | symbol): Promise<T[]>;
|
|
49
|
-
resolve<T>(constructorFunction: interfaces.Newable<T>): T;
|
|
50
|
-
private _preDestroy;
|
|
51
|
-
private _removeModuleHandlers;
|
|
52
|
-
private _removeModuleBindings;
|
|
53
|
-
private _deactivate;
|
|
54
|
-
private _handleDeactivationError;
|
|
55
|
-
private _deactivateContainer;
|
|
56
|
-
private _deactivateContainerAsync;
|
|
57
|
-
private _getContainerModuleHelpersFactory;
|
|
58
|
-
private _getAll;
|
|
59
|
-
private _get;
|
|
60
|
-
private _getButThrowIfAsync;
|
|
61
|
-
private _getAllArgs;
|
|
62
|
-
private _getNotAllArgs;
|
|
63
|
-
private _planAndResolve;
|
|
64
|
-
private _deactivateIfSingleton;
|
|
65
|
-
private _deactivateSingletons;
|
|
66
|
-
private _deactivateSingletonsAsync;
|
|
67
|
-
private _propagateContainerDeactivationThenBindingAndPreDestroy;
|
|
68
|
-
private _propagateContainerDeactivationThenBindingAndPreDestroyAsync;
|
|
69
|
-
private _removeServiceFromDictionary;
|
|
70
|
-
private _bindingDeactivationAndPreDestroy;
|
|
71
|
-
private _bindingDeactivationAndPreDestroyAsync;
|
|
72
|
-
}
|
|
73
|
-
export { Container };
|