inversify 6.1.4 → 6.1.5-beta.1
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 +16 -1
- package/README.md +6 -15
- package/{amd → lib/cjs}/annotation/decorator_utils.d.ts +1 -0
- package/lib/cjs/annotation/decorator_utils.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/decorator_utils.js +25 -7
- package/lib/cjs/annotation/decorator_utils.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/inject.d.ts +1 -0
- package/lib/cjs/annotation/inject.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/inject.js +18 -7
- package/lib/cjs/annotation/inject.js.map +1 -0
- package/{amd → lib/cjs}/annotation/inject_base.d.ts +1 -0
- package/lib/cjs/annotation/inject_base.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/inject_base.js +2 -0
- package/lib/cjs/annotation/inject_base.js.map +1 -0
- package/{amd → lib/cjs}/annotation/injectable.d.ts +1 -0
- package/lib/cjs/annotation/injectable.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/injectable.js +19 -7
- package/lib/cjs/annotation/injectable.js.map +1 -0
- package/{es → lib/cjs}/annotation/multi_inject.d.ts +1 -0
- package/lib/cjs/annotation/multi_inject.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/multi_inject.js +18 -7
- package/lib/cjs/annotation/multi_inject.js.map +1 -0
- package/{amd → lib/cjs}/annotation/named.d.ts +1 -0
- package/lib/cjs/annotation/named.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/named.js +19 -7
- package/lib/cjs/annotation/named.js.map +1 -0
- package/{amd → lib/cjs}/annotation/optional.d.ts +1 -0
- package/lib/cjs/annotation/optional.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/optional.js +18 -7
- package/lib/cjs/annotation/optional.js.map +1 -0
- package/{amd → lib/cjs}/annotation/post_construct.d.ts +1 -0
- package/lib/cjs/annotation/post_construct.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/post_construct.js +18 -7
- package/lib/cjs/annotation/post_construct.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/pre_destroy.d.ts +1 -0
- package/lib/cjs/annotation/pre_destroy.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/pre_destroy.js +18 -7
- package/lib/cjs/annotation/pre_destroy.js.map +1 -0
- package/{es → lib/cjs}/annotation/property_event_decorator.d.ts +1 -0
- package/lib/cjs/annotation/property_event_decorator.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/property_event_decorator.js +1 -0
- package/lib/cjs/annotation/property_event_decorator.js.map +1 -0
- package/{amd → lib/cjs}/annotation/tagged.d.ts +1 -0
- package/lib/cjs/annotation/tagged.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/tagged.js +2 -0
- package/lib/cjs/annotation/tagged.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/target_name.d.ts +1 -0
- package/lib/cjs/annotation/target_name.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/target_name.js +18 -7
- package/lib/cjs/annotation/target_name.js.map +1 -0
- package/{es6 → lib/cjs}/annotation/unmanaged.d.ts +1 -0
- package/lib/cjs/annotation/unmanaged.d.ts.map +1 -0
- package/{es6 → lib/cjs}/annotation/unmanaged.js +18 -7
- package/lib/cjs/annotation/unmanaged.js.map +1 -0
- package/{es6 → lib/cjs}/bindings/binding.d.ts +1 -0
- package/lib/cjs/bindings/binding.d.ts.map +1 -0
- package/{es6 → lib/cjs}/bindings/binding.js +29 -0
- package/lib/cjs/bindings/binding.js.map +1 -0
- package/{amd → lib/cjs}/bindings/binding_count.d.ts +1 -0
- package/lib/cjs/bindings/binding_count.d.ts.map +1 -0
- package/lib/{bindings → cjs/bindings}/binding_count.js +1 -0
- package/lib/cjs/bindings/binding_count.js.map +1 -0
- package/{amd → lib/cjs}/constants/error_msgs.d.ts +1 -0
- package/lib/cjs/constants/error_msgs.d.ts.map +1 -0
- package/{es6 → lib/cjs}/constants/error_msgs.js +2 -0
- package/lib/cjs/constants/error_msgs.js.map +1 -0
- package/{es → lib/cjs}/constants/literal_types.d.ts +1 -0
- package/lib/cjs/constants/literal_types.d.ts.map +1 -0
- package/{es6 → lib/cjs}/constants/literal_types.js +4 -0
- package/lib/cjs/constants/literal_types.js.map +1 -0
- package/{amd → lib/cjs}/constants/metadata_keys.d.ts +1 -0
- package/lib/cjs/constants/metadata_keys.d.ts.map +1 -0
- package/{es6 → lib/cjs}/constants/metadata_keys.js +13 -0
- package/lib/cjs/constants/metadata_keys.js.map +1 -0
- package/{es6 → lib/cjs}/container/container.d.ts +3 -0
- package/lib/cjs/container/container.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/container.js +157 -147
- package/lib/cjs/container/container.js.map +1 -0
- package/{amd → lib/cjs}/container/container_module.d.ts +1 -0
- package/lib/cjs/container/container_module.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/container_module.js +5 -0
- package/lib/cjs/container/container_module.js.map +1 -0
- package/{es → lib/cjs}/container/container_snapshot.d.ts +1 -0
- package/lib/cjs/container/container_snapshot.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/container_snapshot.js +6 -0
- package/lib/cjs/container/container_snapshot.js.map +1 -0
- package/{es → lib/cjs}/container/lookup.d.ts +1 -0
- package/lib/cjs/container/lookup.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/lookup.js +26 -7
- package/lib/cjs/container/lookup.js.map +1 -0
- package/{es6 → lib/cjs}/container/module_activation_store.d.ts +3 -2
- package/lib/cjs/container/module_activation_store.d.ts.map +1 -0
- package/{es6 → lib/cjs}/container/module_activation_store.js +2 -3
- package/lib/cjs/container/module_activation_store.js.map +1 -0
- package/{amd/inversify.d.ts → lib/cjs/index.d.ts} +2 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/{es6/inversify.js → lib/cjs/index.js} +20 -7
- package/lib/cjs/index.js.map +1 -0
- package/{amd → lib/cjs}/interfaces/interfaces.d.ts +3 -2
- package/lib/cjs/interfaces/interfaces.d.ts.map +1 -0
- package/lib/{interfaces → cjs/interfaces}/interfaces.js +1 -0
- package/lib/cjs/interfaces/interfaces.js.map +1 -0
- package/lib/cjs/package.json +3 -0
- package/{es6 → lib/cjs}/planning/context.d.ts +1 -0
- package/lib/cjs/planning/context.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/context.js +5 -0
- package/lib/cjs/planning/context.js.map +1 -0
- package/{es6 → lib/cjs}/planning/metadata.d.ts +1 -0
- package/lib/cjs/planning/metadata.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/metadata.js +20 -7
- package/lib/cjs/planning/metadata.js.map +1 -0
- package/{es → lib/cjs}/planning/metadata_reader.d.ts +1 -0
- package/lib/cjs/planning/metadata_reader.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/metadata_reader.js +24 -12
- package/lib/cjs/planning/metadata_reader.js.map +1 -0
- package/{amd → lib/cjs}/planning/plan.d.ts +1 -0
- package/lib/cjs/planning/plan.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/plan.js +3 -0
- package/lib/cjs/planning/plan.js.map +1 -0
- package/{amd → lib/cjs}/planning/planner.d.ts +1 -0
- package/lib/cjs/planning/planner.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/planner.js +27 -7
- package/lib/cjs/planning/planner.js.map +1 -0
- package/{amd → lib/cjs}/planning/queryable_string.d.ts +1 -0
- package/lib/cjs/planning/queryable_string.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/queryable_string.js +3 -0
- package/lib/cjs/planning/queryable_string.js.map +1 -0
- package/{amd → lib/cjs}/planning/reflection_utils.d.ts +1 -0
- package/lib/cjs/planning/reflection_utils.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/reflection_utils.js +25 -8
- package/lib/cjs/planning/reflection_utils.js.map +1 -0
- package/{amd → lib/cjs}/planning/request.d.ts +1 -0
- package/lib/cjs/planning/request.d.ts.map +1 -0
- package/{es6 → lib/cjs}/planning/request.js +13 -1
- package/lib/cjs/planning/request.js.map +1 -0
- package/{es → lib/cjs}/resolution/instantiation.d.ts +1 -0
- package/lib/cjs/resolution/instantiation.d.ts.map +1 -0
- package/{es6 → lib/cjs}/resolution/instantiation.js +40 -37
- package/lib/cjs/resolution/instantiation.js.map +1 -0
- package/{amd → lib/cjs}/resolution/resolver.d.ts +1 -0
- package/lib/cjs/resolution/resolver.d.ts.map +1 -0
- package/{es6 → lib/cjs}/resolution/resolver.js +39 -20
- package/lib/cjs/resolution/resolver.js.map +1 -0
- package/{amd → lib/cjs}/scope/scope.d.ts +1 -0
- package/lib/cjs/scope/scope.d.ts.map +1 -0
- package/{es6 → lib/cjs}/scope/scope.js +10 -12
- package/lib/cjs/scope/scope.js.map +1 -0
- package/{amd → lib/cjs}/syntax/binding_in_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_in_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_in_syntax.js +2 -0
- package/lib/cjs/syntax/binding_in_syntax.js.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_in_when_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_in_when_on_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_in_when_on_syntax.js +5 -0
- package/lib/cjs/syntax/binding_in_when_on_syntax.js.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_on_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_on_syntax.js +2 -0
- package/lib/cjs/syntax/binding_on_syntax.js.map +1 -0
- package/{es → lib/cjs}/syntax/binding_to_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_to_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_to_syntax.js +43 -8
- package/lib/cjs/syntax/binding_to_syntax.js.map +1 -0
- package/{amd → lib/cjs}/syntax/binding_when_on_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_when_on_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_when_on_syntax.js +4 -0
- package/lib/cjs/syntax/binding_when_on_syntax.js.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_when_syntax.d.ts +1 -0
- package/lib/cjs/syntax/binding_when_syntax.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/binding_when_syntax.js +5 -1
- package/lib/cjs/syntax/binding_when_syntax.js.map +1 -0
- package/{amd → lib/cjs}/syntax/constraint_helpers.d.ts +1 -0
- package/lib/cjs/syntax/constraint_helpers.d.ts.map +1 -0
- package/{es6 → lib/cjs}/syntax/constraint_helpers.js +22 -7
- package/lib/cjs/syntax/constraint_helpers.js.map +1 -0
- package/{amd → lib/cjs}/utils/async.d.ts +1 -0
- package/lib/cjs/utils/async.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/async.js +1 -0
- package/lib/cjs/utils/async.js.map +1 -0
- package/{es6 → lib/cjs}/utils/binding_utils.d.ts +1 -0
- package/lib/cjs/utils/binding_utils.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/binding_utils.js +21 -7
- package/lib/cjs/utils/binding_utils.js.map +1 -0
- package/{es6 → lib/cjs}/utils/clonable.d.ts +1 -0
- package/lib/cjs/utils/clonable.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/clonable.js +1 -0
- package/lib/cjs/utils/clonable.js.map +1 -0
- package/{amd → lib/cjs}/utils/exceptions.d.ts +1 -0
- package/lib/cjs/utils/exceptions.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/exceptions.js +18 -7
- package/lib/cjs/utils/exceptions.js.map +1 -0
- package/{es6 → lib/cjs}/utils/factory_type.d.ts +1 -0
- package/lib/cjs/utils/factory_type.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/factory_type.js +1 -0
- package/lib/cjs/utils/factory_type.js.map +1 -0
- package/{amd → lib/cjs}/utils/id.d.ts +1 -0
- package/lib/cjs/utils/id.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/id.js +1 -0
- package/lib/cjs/utils/id.js.map +1 -0
- package/{amd → lib/cjs}/utils/js.d.ts +1 -0
- package/lib/cjs/utils/js.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/js.js +1 -0
- package/lib/cjs/utils/js.js.map +1 -0
- package/{amd → lib/cjs}/utils/serialization.d.ts +1 -0
- package/lib/cjs/utils/serialization.d.ts.map +1 -0
- package/{es6 → lib/cjs}/utils/serialization.js +23 -7
- package/lib/cjs/utils/serialization.js.map +1 -0
- package/{es6/interfaces/interfaces.d.ts → lib/esm/index.d.ts} +207 -8
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +2 -0
- package/lib/esm/index.js.map +1 -0
- package/package.json +30 -34
- 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.js +0 -16
- 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.js +0 -32
- package/amd/annotation/optional.js +0 -32
- 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.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.js +0 -11
- 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.js +0 -28
- package/amd/container/container.d.ts +0 -73
- package/amd/container/container.js +0 -766
- 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.js +0 -4
- 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.js +0 -13
- package/amd/planning/planner.js +0 -187
- package/amd/planning/queryable_string.js +0 -33
- package/amd/planning/reflection_utils.js +0 -55
- 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.js +0 -234
- package/amd/scope/scope.js +0 -93
- 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.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.js +0 -66
- 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.js +0 -46
- package/amd/utils/factory_type.d.ts +0 -5
- package/amd/utils/factory_type.js +0 -11
- package/amd/utils/id.js +0 -9
- package/amd/utils/js.js +0 -18
- package/amd/utils/serialization.js +0 -135
- package/es/annotation/decorator_utils.d.ts +0 -16
- package/es/annotation/decorator_utils.js +0 -90
- package/es/annotation/inject.d.ts +0 -5
- package/es/annotation/inject.js +0 -4
- package/es/annotation/inject_base.d.ts +0 -4
- package/es/annotation/inject_base.js +0 -14
- package/es/annotation/injectable.d.ts +0 -2
- package/es/annotation/injectable.js +0 -13
- package/es/annotation/lazy_service_identifier.js +0 -1
- package/es/annotation/multi_inject.js +0 -4
- package/es/annotation/named.d.ts +0 -2
- package/es/annotation/named.js +0 -7
- package/es/annotation/optional.d.ts +0 -2
- package/es/annotation/optional.js +0 -7
- package/es/annotation/post_construct.d.ts +0 -4
- package/es/annotation/post_construct.js +0 -5
- package/es/annotation/pre_destroy.d.ts +0 -4
- package/es/annotation/pre_destroy.js +0 -5
- package/es/annotation/property_event_decorator.js +0 -13
- package/es/annotation/tagged.d.ts +0 -2
- package/es/annotation/tagged.js +0 -6
- package/es/annotation/target_name.d.ts +0 -3
- package/es/annotation/target_name.js +0 -10
- package/es/annotation/unmanaged.d.ts +0 -3
- package/es/annotation/unmanaged.js +0 -10
- package/es/bindings/binding.d.ts +0 -20
- package/es/bindings/binding.js +0 -37
- package/es/bindings/binding_count.d.ts +0 -5
- package/es/bindings/binding_count.js +0 -6
- package/es/constants/error_msgs.d.ts +0 -30
- package/es/constants/error_msgs.js +0 -62
- package/es/constants/literal_types.js +0 -21
- package/es/constants/metadata_keys.d.ts +0 -13
- package/es/constants/metadata_keys.js +0 -23
- package/es/container/container.d.ts +0 -73
- package/es/container/container.js +0 -750
- package/es/container/container_module.d.ts +0 -11
- package/es/container/container_module.js +0 -17
- package/es/container/container_snapshot.js +0 -15
- package/es/container/lookup.js +0 -105
- package/es/container/module_activation_store.d.ts +0 -10
- package/es/container/module_activation_store.js +0 -47
- package/es/interfaces/interfaces.d.ts +0 -269
- package/es/interfaces/interfaces.js +0 -1
- package/es/inversify.d.ts +0 -24
- package/es/inversify.js +0 -2
- package/es/planning/context.d.ts +0 -11
- package/es/planning/context.js +0 -15
- package/es/planning/metadata.d.ts +0 -8
- package/es/planning/metadata.js +0 -17
- package/es/planning/metadata_reader.js +0 -21
- package/es/planning/plan.d.ts +0 -7
- package/es/planning/plan.js +0 -8
- package/es/planning/planner.d.ts +0 -5
- package/es/planning/planner.js +0 -168
- package/es/planning/queryable_string.d.ts +0 -10
- package/es/planning/queryable_string.js +0 -28
- package/es/planning/reflection_utils.d.ts +0 -5
- package/es/planning/reflection_utils.js +0 -27
- package/es/planning/request.d.ts +0 -14
- package/es/planning/request.js +0 -20
- package/es/planning/target.js +0 -87
- package/es/resolution/instantiation.js +0 -195
- package/es/resolution/resolver.d.ts +0 -3
- package/es/resolution/resolver.js +0 -214
- package/es/scope/scope.d.ts +0 -3
- package/es/scope/scope.js +0 -88
- package/es/syntax/binding_in_syntax.d.ts +0 -9
- package/es/syntax/binding_in_syntax.js +0 -21
- package/es/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/es/syntax/binding_in_when_on_syntax.js +0 -73
- package/es/syntax/binding_on_syntax.d.ts +0 -8
- package/es/syntax/binding_on_syntax.js +0 -16
- package/es/syntax/binding_to_syntax.js +0 -91
- package/es/syntax/binding_when_on_syntax.d.ts +0 -25
- package/es/syntax/binding_when_on_syntax.js +0 -62
- package/es/syntax/binding_when_syntax.d.ts +0 -21
- package/es/syntax/binding_when_syntax.js +0 -104
- package/es/syntax/constraint_helpers.d.ts +0 -6
- package/es/syntax/constraint_helpers.js +0 -36
- package/es/utils/async.d.ts +0 -3
- package/es/utils/async.js +0 -12
- package/es/utils/binding_utils.d.ts +0 -4
- package/es/utils/binding_utils.js +0 -58
- package/es/utils/clonable.d.ts +0 -3
- package/es/utils/clonable.js +0 -7
- package/es/utils/exceptions.d.ts +0 -2
- package/es/utils/exceptions.js +0 -16
- package/es/utils/factory_type.d.ts +0 -5
- package/es/utils/factory_type.js +0 -6
- package/es/utils/id.d.ts +0 -2
- package/es/utils/id.js +0 -5
- package/es/utils/js.d.ts +0 -1
- package/es/utils/js.js +0 -13
- package/es/utils/serialization.d.ts +0 -10
- package/es/utils/serialization.js +0 -103
- package/es6/annotation/decorator_utils.d.ts +0 -16
- package/es6/annotation/inject_base.d.ts +0 -4
- package/es6/annotation/injectable.d.ts +0 -2
- package/es6/annotation/lazy_service_identifier.js +0 -2
- package/es6/annotation/multi_inject.d.ts +0 -5
- package/es6/annotation/named.d.ts +0 -2
- package/es6/annotation/optional.d.ts +0 -2
- package/es6/annotation/post_construct.d.ts +0 -4
- package/es6/annotation/property_event_decorator.d.ts +0 -4
- package/es6/annotation/tagged.d.ts +0 -2
- 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/literal_types.d.ts +0 -5
- package/es6/constants/metadata_keys.d.ts +0 -13
- package/es6/container/container_module.d.ts +0 -11
- package/es6/container/container_snapshot.d.ts +0 -10
- package/es6/container/lookup.d.ts +0 -17
- package/es6/interfaces/interfaces.js +0 -2
- package/es6/inversify.d.ts +0 -24
- package/es6/planning/metadata_reader.d.ts +0 -6
- package/es6/planning/plan.d.ts +0 -7
- package/es6/planning/planner.d.ts +0 -5
- package/es6/planning/queryable_string.d.ts +0 -10
- package/es6/planning/reflection_utils.d.ts +0 -5
- package/es6/planning/request.d.ts +0 -14
- package/es6/planning/target.js +0 -105
- package/es6/resolution/instantiation.d.ts +0 -3
- package/es6/resolution/resolver.d.ts +0 -3
- package/es6/scope/scope.d.ts +0 -3
- package/es6/syntax/binding_in_syntax.d.ts +0 -9
- package/es6/syntax/binding_to_syntax.d.ts +0 -18
- package/es6/syntax/binding_when_on_syntax.d.ts +0 -25
- package/es6/syntax/constraint_helpers.d.ts +0 -6
- package/es6/utils/async.d.ts +0 -3
- package/es6/utils/exceptions.d.ts +0 -2
- package/es6/utils/id.d.ts +0 -2
- package/es6/utils/js.d.ts +0 -1
- package/es6/utils/serialization.d.ts +0 -10
- package/lib/annotation/decorator_utils.d.ts +0 -16
- package/lib/annotation/decorator_utils.js +0 -118
- package/lib/annotation/inject.d.ts +0 -5
- package/lib/annotation/inject.js +0 -30
- package/lib/annotation/inject_base.d.ts +0 -4
- package/lib/annotation/inject_base.js +0 -17
- package/lib/annotation/injectable.d.ts +0 -2
- package/lib/annotation/injectable.js +0 -38
- package/lib/annotation/lazy_service_identifier.d.ts +0 -3
- package/lib/annotation/lazy_service_identifier.js +0 -2
- package/lib/annotation/multi_inject.d.ts +0 -5
- package/lib/annotation/multi_inject.js +0 -30
- package/lib/annotation/named.d.ts +0 -2
- package/lib/annotation/named.js +0 -32
- package/lib/annotation/optional.d.ts +0 -2
- package/lib/annotation/optional.js +0 -32
- package/lib/annotation/post_construct.d.ts +0 -4
- package/lib/annotation/post_construct.js +0 -31
- package/lib/annotation/pre_destroy.d.ts +0 -4
- package/lib/annotation/pre_destroy.js +0 -31
- package/lib/annotation/property_event_decorator.d.ts +0 -4
- package/lib/annotation/property_event_decorator.js +0 -15
- package/lib/annotation/tagged.d.ts +0 -2
- package/lib/annotation/tagged.js +0 -8
- package/lib/annotation/target_name.d.ts +0 -3
- package/lib/annotation/target_name.js +0 -35
- package/lib/annotation/unmanaged.d.ts +0 -3
- package/lib/annotation/unmanaged.js +0 -35
- package/lib/bindings/binding.d.ts +0 -20
- package/lib/bindings/binding.js +0 -40
- package/lib/bindings/binding_count.d.ts +0 -5
- package/lib/constants/error_msgs.d.ts +0 -30
- package/lib/constants/error_msgs.js +0 -73
- package/lib/constants/literal_types.d.ts +0 -5
- package/lib/constants/literal_types.js +0 -26
- package/lib/constants/metadata_keys.d.ts +0 -13
- package/lib/constants/metadata_keys.js +0 -26
- package/lib/container/container.d.ts +0 -73
- package/lib/container/container.js +0 -776
- package/lib/container/container_module.d.ts +0 -11
- package/lib/container/container_module.js +0 -20
- package/lib/container/container_snapshot.d.ts +0 -10
- package/lib/container/container_snapshot.js +0 -18
- package/lib/container/lookup.d.ts +0 -17
- package/lib/container/lookup.js +0 -131
- package/lib/container/module_activation_store.d.ts +0 -10
- package/lib/container/module_activation_store.js +0 -50
- package/lib/interfaces/interfaces.d.ts +0 -269
- package/lib/inversify.d.ts +0 -24
- package/lib/inversify.js +0 -76
- package/lib/planning/context.d.ts +0 -11
- package/lib/planning/context.js +0 -18
- package/lib/planning/metadata.d.ts +0 -8
- package/lib/planning/metadata.js +0 -43
- package/lib/planning/metadata_reader.d.ts +0 -6
- package/lib/planning/metadata_reader.js +0 -47
- package/lib/planning/plan.d.ts +0 -7
- package/lib/planning/plan.js +0 -11
- package/lib/planning/planner.d.ts +0 -5
- package/lib/planning/planner.js +0 -195
- package/lib/planning/queryable_string.d.ts +0 -10
- package/lib/planning/queryable_string.js +0 -31
- package/lib/planning/reflection_utils.d.ts +0 -5
- package/lib/planning/reflection_utils.js +0 -55
- package/lib/planning/request.d.ts +0 -14
- package/lib/planning/request.js +0 -23
- package/lib/planning/target.d.ts +0 -23
- package/lib/planning/target.js +0 -113
- package/lib/resolution/instantiation.d.ts +0 -3
- package/lib/resolution/instantiation.js +0 -220
- package/lib/resolution/resolver.d.ts +0 -3
- package/lib/resolution/resolver.js +0 -239
- package/lib/scope/scope.d.ts +0 -3
- package/lib/scope/scope.js +0 -93
- package/lib/syntax/binding_in_syntax.d.ts +0 -9
- package/lib/syntax/binding_in_syntax.js +0 -24
- package/lib/syntax/binding_in_when_on_syntax.d.ts +0 -29
- package/lib/syntax/binding_in_when_on_syntax.js +0 -76
- package/lib/syntax/binding_on_syntax.d.ts +0 -8
- package/lib/syntax/binding_on_syntax.js +0 -19
- package/lib/syntax/binding_to_syntax.d.ts +0 -18
- package/lib/syntax/binding_to_syntax.js +0 -117
- package/lib/syntax/binding_when_on_syntax.d.ts +0 -25
- package/lib/syntax/binding_when_on_syntax.js +0 -65
- package/lib/syntax/binding_when_syntax.d.ts +0 -21
- package/lib/syntax/binding_when_syntax.js +0 -107
- package/lib/syntax/constraint_helpers.d.ts +0 -6
- package/lib/syntax/constraint_helpers.js +0 -65
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/utils/async.d.ts +0 -3
- package/lib/utils/async.js +0 -15
- package/lib/utils/binding_utils.d.ts +0 -4
- package/lib/utils/binding_utils.js +0 -87
- package/lib/utils/clonable.d.ts +0 -3
- package/lib/utils/clonable.js +0 -9
- package/lib/utils/exceptions.d.ts +0 -2
- package/lib/utils/exceptions.js +0 -44
- package/lib/utils/factory_type.d.ts +0 -5
- package/lib/utils/factory_type.js +0 -9
- package/lib/utils/id.d.ts +0 -2
- package/lib/utils/id.js +0 -7
- package/lib/utils/js.d.ts +0 -1
- package/lib/utils/js.js +0 -16
- package/lib/utils/serialization.d.ts +0 -10
- package/lib/utils/serialization.js +0 -133
- /package/{es → lib/esm}/package.json +0 -0
|
@@ -1,214 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import * as ERROR_MSGS from '../constants/error_msgs';
|
|
38
|
-
import { BindingTypeEnum } from '../constants/literal_types';
|
|
39
|
-
import { getBindingDictionary } from '../planning/planner';
|
|
40
|
-
import { saveToScope, tryGetFromScope } from '../scope/scope';
|
|
41
|
-
import { isPromise } from '../utils/async';
|
|
42
|
-
import { ensureFullyBound, getFactoryDetails } from '../utils/binding_utils';
|
|
43
|
-
import { tryAndThrowErrorIfStackOverflow } from '../utils/exceptions';
|
|
44
|
-
import { resolveInstance } from './instantiation';
|
|
45
|
-
var _resolveRequest = function (requestScope) {
|
|
46
|
-
return function (request) {
|
|
47
|
-
request.parentContext.setCurrentRequest(request);
|
|
48
|
-
var bindings = request.bindings;
|
|
49
|
-
var childRequests = request.childRequests;
|
|
50
|
-
var targetIsAnArray = request.target && request.target.isArray();
|
|
51
|
-
var targetParentIsNotAnArray = !request.parentRequest ||
|
|
52
|
-
!request.parentRequest.target ||
|
|
53
|
-
!request.target ||
|
|
54
|
-
!request.parentRequest.target.matchesArray(request.target.serviceIdentifier);
|
|
55
|
-
if (targetIsAnArray && targetParentIsNotAnArray) {
|
|
56
|
-
return childRequests.map(function (childRequest) {
|
|
57
|
-
var resolveRequest = _resolveRequest(requestScope);
|
|
58
|
-
return resolveRequest(childRequest);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
if (request.target.isOptional() && bindings.length === 0) {
|
|
63
|
-
return undefined;
|
|
64
|
-
}
|
|
65
|
-
var binding = bindings[0];
|
|
66
|
-
return _resolveBinding(requestScope, request, binding);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
var _resolveFactoryFromBinding = function (binding, context) {
|
|
71
|
-
var factoryDetails = getFactoryDetails(binding);
|
|
72
|
-
return tryAndThrowErrorIfStackOverflow(function () {
|
|
73
|
-
return factoryDetails.factory.bind(binding)(context);
|
|
74
|
-
}, function () {
|
|
75
|
-
return new Error(ERROR_MSGS.CIRCULAR_DEPENDENCY_IN_FACTORY(factoryDetails.factoryType, context.currentRequest.serviceIdentifier.toString()));
|
|
76
|
-
});
|
|
77
|
-
};
|
|
78
|
-
var _getResolvedFromBinding = function (requestScope, request, binding) {
|
|
79
|
-
var result;
|
|
80
|
-
var childRequests = request.childRequests;
|
|
81
|
-
ensureFullyBound(binding);
|
|
82
|
-
switch (binding.type) {
|
|
83
|
-
case BindingTypeEnum.ConstantValue:
|
|
84
|
-
case BindingTypeEnum.Function:
|
|
85
|
-
result = binding.cache;
|
|
86
|
-
break;
|
|
87
|
-
case BindingTypeEnum.Constructor:
|
|
88
|
-
result = binding.implementationType;
|
|
89
|
-
break;
|
|
90
|
-
case BindingTypeEnum.Instance:
|
|
91
|
-
result = resolveInstance(binding, binding.implementationType, childRequests, _resolveRequest(requestScope));
|
|
92
|
-
break;
|
|
93
|
-
default:
|
|
94
|
-
result = _resolveFactoryFromBinding(binding, request.parentContext);
|
|
95
|
-
}
|
|
96
|
-
return result;
|
|
97
|
-
};
|
|
98
|
-
var _resolveInScope = function (requestScope, binding, resolveFromBinding) {
|
|
99
|
-
var result = tryGetFromScope(requestScope, binding);
|
|
100
|
-
if (result !== null) {
|
|
101
|
-
return result;
|
|
102
|
-
}
|
|
103
|
-
result = resolveFromBinding();
|
|
104
|
-
saveToScope(requestScope, binding, result);
|
|
105
|
-
return result;
|
|
106
|
-
};
|
|
107
|
-
var _resolveBinding = function (requestScope, request, binding) {
|
|
108
|
-
return _resolveInScope(requestScope, binding, function () {
|
|
109
|
-
var result = _getResolvedFromBinding(requestScope, request, binding);
|
|
110
|
-
if (isPromise(result)) {
|
|
111
|
-
result = result.then(function (resolved) {
|
|
112
|
-
return _onActivation(request, binding, resolved);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
result = _onActivation(request, binding, result);
|
|
117
|
-
}
|
|
118
|
-
return result;
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
function _onActivation(request, binding, resolved) {
|
|
122
|
-
var result = _bindingActivation(request.parentContext, binding, resolved);
|
|
123
|
-
var containersIterator = _getContainersIterator(request.parentContext.container);
|
|
124
|
-
var container;
|
|
125
|
-
var containersIteratorResult = containersIterator.next();
|
|
126
|
-
do {
|
|
127
|
-
container = containersIteratorResult.value;
|
|
128
|
-
var context_1 = request.parentContext;
|
|
129
|
-
var serviceIdentifier = request.serviceIdentifier;
|
|
130
|
-
var activationsIterator = _getContainerActivationsForService(container, serviceIdentifier);
|
|
131
|
-
if (isPromise(result)) {
|
|
132
|
-
result = _activateContainerAsync(activationsIterator, context_1, result);
|
|
133
|
-
}
|
|
134
|
-
else {
|
|
135
|
-
result = _activateContainer(activationsIterator, context_1, result);
|
|
136
|
-
}
|
|
137
|
-
containersIteratorResult = containersIterator.next();
|
|
138
|
-
} while (containersIteratorResult.done !== true &&
|
|
139
|
-
!getBindingDictionary(container).hasKey(request.serviceIdentifier));
|
|
140
|
-
return result;
|
|
141
|
-
}
|
|
142
|
-
var _bindingActivation = function (context, binding, previousResult) {
|
|
143
|
-
var result;
|
|
144
|
-
if (typeof binding.onActivation === 'function') {
|
|
145
|
-
result = binding.onActivation(context, previousResult);
|
|
146
|
-
}
|
|
147
|
-
else {
|
|
148
|
-
result = previousResult;
|
|
149
|
-
}
|
|
150
|
-
return result;
|
|
151
|
-
};
|
|
152
|
-
var _activateContainer = function (activationsIterator, context, result) {
|
|
153
|
-
var activation = activationsIterator.next();
|
|
154
|
-
while (activation.done !== true) {
|
|
155
|
-
result = activation.value(context, result);
|
|
156
|
-
if (isPromise(result)) {
|
|
157
|
-
return _activateContainerAsync(activationsIterator, context, result);
|
|
158
|
-
}
|
|
159
|
-
activation = activationsIterator.next();
|
|
160
|
-
}
|
|
161
|
-
return result;
|
|
162
|
-
};
|
|
163
|
-
var _activateContainerAsync = function (activationsIterator, context, resultPromise) { return __awaiter(void 0, void 0, void 0, function () {
|
|
164
|
-
var result, activation;
|
|
165
|
-
return __generator(this, function (_a) {
|
|
166
|
-
switch (_a.label) {
|
|
167
|
-
case 0: return [4, resultPromise];
|
|
168
|
-
case 1:
|
|
169
|
-
result = _a.sent();
|
|
170
|
-
activation = activationsIterator.next();
|
|
171
|
-
_a.label = 2;
|
|
172
|
-
case 2:
|
|
173
|
-
if (!(activation.done !== true)) return [3, 4];
|
|
174
|
-
return [4, activation.value(context, result)];
|
|
175
|
-
case 3:
|
|
176
|
-
result = _a.sent();
|
|
177
|
-
activation = activationsIterator.next();
|
|
178
|
-
return [3, 2];
|
|
179
|
-
case 4: return [2, result];
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
}); };
|
|
183
|
-
var _getContainerActivationsForService = function (container, serviceIdentifier) {
|
|
184
|
-
var activations = container._activations;
|
|
185
|
-
return activations.hasKey(serviceIdentifier)
|
|
186
|
-
? activations.get(serviceIdentifier).values()
|
|
187
|
-
: [].values();
|
|
188
|
-
};
|
|
189
|
-
var _getContainersIterator = function (container) {
|
|
190
|
-
var containersStack = [container];
|
|
191
|
-
var parent = container.parent;
|
|
192
|
-
while (parent !== null) {
|
|
193
|
-
containersStack.push(parent);
|
|
194
|
-
parent = parent.parent;
|
|
195
|
-
}
|
|
196
|
-
var getNextContainer = function () {
|
|
197
|
-
var nextContainer = containersStack.pop();
|
|
198
|
-
if (nextContainer !== undefined) {
|
|
199
|
-
return { done: false, value: nextContainer };
|
|
200
|
-
}
|
|
201
|
-
else {
|
|
202
|
-
return { done: true, value: undefined };
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
var containersIterator = {
|
|
206
|
-
next: getNextContainer,
|
|
207
|
-
};
|
|
208
|
-
return containersIterator;
|
|
209
|
-
};
|
|
210
|
-
function resolve(context) {
|
|
211
|
-
var resolveRequestFunction = _resolveRequest(context.plan.rootRequest.requestScope);
|
|
212
|
-
return resolveRequestFunction(context.plan.rootRequest);
|
|
213
|
-
}
|
|
214
|
-
export { resolve };
|
package/es/scope/scope.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
export declare const tryGetFromScope: <T>(requestScope: interfaces.RequestScope, binding: interfaces.Binding<T>) => T | Promise<T> | null;
|
|
3
|
-
export declare const saveToScope: <T>(requestScope: interfaces.RequestScope, binding: interfaces.Binding<T>, result: T | Promise<T>) => void;
|
package/es/scope/scope.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
11
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
12
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
13
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
14
|
-
function step(op) {
|
|
15
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
16
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
17
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
18
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
19
|
-
switch (op[0]) {
|
|
20
|
-
case 0: case 1: t = op; break;
|
|
21
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
22
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
23
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
24
|
-
default:
|
|
25
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
26
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
27
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
28
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
29
|
-
if (t[2]) _.ops.pop();
|
|
30
|
-
_.trys.pop(); continue;
|
|
31
|
-
}
|
|
32
|
-
op = body.call(thisArg, _);
|
|
33
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
34
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
import { BindingScopeEnum } from '../constants/literal_types';
|
|
38
|
-
import { isPromise } from '../utils/async';
|
|
39
|
-
export var tryGetFromScope = function (requestScope, binding) {
|
|
40
|
-
if (binding.scope === BindingScopeEnum.Singleton && binding.activated) {
|
|
41
|
-
return binding.cache;
|
|
42
|
-
}
|
|
43
|
-
if (binding.scope === BindingScopeEnum.Request &&
|
|
44
|
-
requestScope.has(binding.id)) {
|
|
45
|
-
return requestScope.get(binding.id);
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
48
|
-
};
|
|
49
|
-
export var saveToScope = function (requestScope, binding, result) {
|
|
50
|
-
if (binding.scope === BindingScopeEnum.Singleton) {
|
|
51
|
-
_saveToSingletonScope(binding, result);
|
|
52
|
-
}
|
|
53
|
-
if (binding.scope === BindingScopeEnum.Request) {
|
|
54
|
-
_saveToRequestScope(requestScope, binding, result);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
var _saveToRequestScope = function (requestScope, binding, result) {
|
|
58
|
-
if (!requestScope.has(binding.id)) {
|
|
59
|
-
requestScope.set(binding.id, result);
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
var _saveToSingletonScope = function (binding, result) {
|
|
63
|
-
binding.cache = result;
|
|
64
|
-
binding.activated = true;
|
|
65
|
-
if (isPromise(result)) {
|
|
66
|
-
void _saveAsyncResultToSingletonScope(binding, result);
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
var _saveAsyncResultToSingletonScope = function (binding, asyncResult) { return __awaiter(void 0, void 0, void 0, function () {
|
|
70
|
-
var result, ex_1;
|
|
71
|
-
return __generator(this, function (_a) {
|
|
72
|
-
switch (_a.label) {
|
|
73
|
-
case 0:
|
|
74
|
-
_a.trys.push([0, 2, , 3]);
|
|
75
|
-
return [4, asyncResult];
|
|
76
|
-
case 1:
|
|
77
|
-
result = _a.sent();
|
|
78
|
-
binding.cache = result;
|
|
79
|
-
return [3, 3];
|
|
80
|
-
case 2:
|
|
81
|
-
ex_1 = _a.sent();
|
|
82
|
-
binding.cache = null;
|
|
83
|
-
binding.activated = false;
|
|
84
|
-
throw ex_1;
|
|
85
|
-
case 3: return [2];
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}); };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class BindingInSyntax<T> implements interfaces.BindingInSyntax<T> {
|
|
3
|
-
private readonly _binding;
|
|
4
|
-
constructor(binding: interfaces.Binding<T>);
|
|
5
|
-
inRequestScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
6
|
-
inSingletonScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
7
|
-
inTransientScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
8
|
-
}
|
|
9
|
-
export { BindingInSyntax };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { BindingScopeEnum } from '../constants/literal_types';
|
|
2
|
-
import { BindingWhenOnSyntax } from './binding_when_on_syntax';
|
|
3
|
-
var BindingInSyntax = (function () {
|
|
4
|
-
function BindingInSyntax(binding) {
|
|
5
|
-
this._binding = binding;
|
|
6
|
-
}
|
|
7
|
-
BindingInSyntax.prototype.inRequestScope = function () {
|
|
8
|
-
this._binding.scope = BindingScopeEnum.Request;
|
|
9
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
10
|
-
};
|
|
11
|
-
BindingInSyntax.prototype.inSingletonScope = function () {
|
|
12
|
-
this._binding.scope = BindingScopeEnum.Singleton;
|
|
13
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
14
|
-
};
|
|
15
|
-
BindingInSyntax.prototype.inTransientScope = function () {
|
|
16
|
-
this._binding.scope = BindingScopeEnum.Transient;
|
|
17
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
18
|
-
};
|
|
19
|
-
return BindingInSyntax;
|
|
20
|
-
}());
|
|
21
|
-
export { BindingInSyntax };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class BindingInWhenOnSyntax<T> implements interfaces.BindingInSyntax<T>, interfaces.BindingWhenSyntax<T>, interfaces.BindingOnSyntax<T> {
|
|
3
|
-
private readonly _bindingInSyntax;
|
|
4
|
-
private readonly _bindingWhenSyntax;
|
|
5
|
-
private readonly _bindingOnSyntax;
|
|
6
|
-
private readonly _binding;
|
|
7
|
-
constructor(binding: interfaces.Binding<T>);
|
|
8
|
-
inRequestScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
9
|
-
inSingletonScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
10
|
-
inTransientScope(): interfaces.BindingWhenOnSyntax<T>;
|
|
11
|
-
when(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
12
|
-
whenTargetNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
13
|
-
whenTargetIsDefault(): interfaces.BindingOnSyntax<T>;
|
|
14
|
-
whenTargetTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
15
|
-
whenInjectedInto(parent: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
16
|
-
whenParentNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
17
|
-
whenParentTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
18
|
-
whenAnyAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
19
|
-
whenNoAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
20
|
-
whenAnyAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
21
|
-
whenAnyAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
22
|
-
whenNoAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
23
|
-
whenNoAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
24
|
-
whenAnyAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
25
|
-
whenNoAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
26
|
-
onActivation(handler: (context: interfaces.Context, injectable: T) => T | Promise<T>): interfaces.BindingWhenSyntax<T>;
|
|
27
|
-
onDeactivation(handler: (injectable: T) => void | Promise<void>): interfaces.BindingWhenSyntax<T>;
|
|
28
|
-
}
|
|
29
|
-
export { BindingInWhenOnSyntax };
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { BindingInSyntax } from './binding_in_syntax';
|
|
2
|
-
import { BindingOnSyntax } from './binding_on_syntax';
|
|
3
|
-
import { BindingWhenSyntax } from './binding_when_syntax';
|
|
4
|
-
var BindingInWhenOnSyntax = (function () {
|
|
5
|
-
function BindingInWhenOnSyntax(binding) {
|
|
6
|
-
this._binding = binding;
|
|
7
|
-
this._bindingWhenSyntax = new BindingWhenSyntax(this._binding);
|
|
8
|
-
this._bindingOnSyntax = new BindingOnSyntax(this._binding);
|
|
9
|
-
this._bindingInSyntax = new BindingInSyntax(binding);
|
|
10
|
-
}
|
|
11
|
-
BindingInWhenOnSyntax.prototype.inRequestScope = function () {
|
|
12
|
-
return this._bindingInSyntax.inRequestScope();
|
|
13
|
-
};
|
|
14
|
-
BindingInWhenOnSyntax.prototype.inSingletonScope = function () {
|
|
15
|
-
return this._bindingInSyntax.inSingletonScope();
|
|
16
|
-
};
|
|
17
|
-
BindingInWhenOnSyntax.prototype.inTransientScope = function () {
|
|
18
|
-
return this._bindingInSyntax.inTransientScope();
|
|
19
|
-
};
|
|
20
|
-
BindingInWhenOnSyntax.prototype.when = function (constraint) {
|
|
21
|
-
return this._bindingWhenSyntax.when(constraint);
|
|
22
|
-
};
|
|
23
|
-
BindingInWhenOnSyntax.prototype.whenTargetNamed = function (name) {
|
|
24
|
-
return this._bindingWhenSyntax.whenTargetNamed(name);
|
|
25
|
-
};
|
|
26
|
-
BindingInWhenOnSyntax.prototype.whenTargetIsDefault = function () {
|
|
27
|
-
return this._bindingWhenSyntax.whenTargetIsDefault();
|
|
28
|
-
};
|
|
29
|
-
BindingInWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) {
|
|
30
|
-
return this._bindingWhenSyntax.whenTargetTagged(tag, value);
|
|
31
|
-
};
|
|
32
|
-
BindingInWhenOnSyntax.prototype.whenInjectedInto = function (parent) {
|
|
33
|
-
return this._bindingWhenSyntax.whenInjectedInto(parent);
|
|
34
|
-
};
|
|
35
|
-
BindingInWhenOnSyntax.prototype.whenParentNamed = function (name) {
|
|
36
|
-
return this._bindingWhenSyntax.whenParentNamed(name);
|
|
37
|
-
};
|
|
38
|
-
BindingInWhenOnSyntax.prototype.whenParentTagged = function (tag, value) {
|
|
39
|
-
return this._bindingWhenSyntax.whenParentTagged(tag, value);
|
|
40
|
-
};
|
|
41
|
-
BindingInWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) {
|
|
42
|
-
return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor);
|
|
43
|
-
};
|
|
44
|
-
BindingInWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) {
|
|
45
|
-
return this._bindingWhenSyntax.whenNoAncestorIs(ancestor);
|
|
46
|
-
};
|
|
47
|
-
BindingInWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) {
|
|
48
|
-
return this._bindingWhenSyntax.whenAnyAncestorNamed(name);
|
|
49
|
-
};
|
|
50
|
-
BindingInWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {
|
|
51
|
-
return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);
|
|
52
|
-
};
|
|
53
|
-
BindingInWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) {
|
|
54
|
-
return this._bindingWhenSyntax.whenNoAncestorNamed(name);
|
|
55
|
-
};
|
|
56
|
-
BindingInWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) {
|
|
57
|
-
return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);
|
|
58
|
-
};
|
|
59
|
-
BindingInWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) {
|
|
60
|
-
return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint);
|
|
61
|
-
};
|
|
62
|
-
BindingInWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) {
|
|
63
|
-
return this._bindingWhenSyntax.whenNoAncestorMatches(constraint);
|
|
64
|
-
};
|
|
65
|
-
BindingInWhenOnSyntax.prototype.onActivation = function (handler) {
|
|
66
|
-
return this._bindingOnSyntax.onActivation(handler);
|
|
67
|
-
};
|
|
68
|
-
BindingInWhenOnSyntax.prototype.onDeactivation = function (handler) {
|
|
69
|
-
return this._bindingOnSyntax.onDeactivation(handler);
|
|
70
|
-
};
|
|
71
|
-
return BindingInWhenOnSyntax;
|
|
72
|
-
}());
|
|
73
|
-
export { BindingInWhenOnSyntax };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class BindingOnSyntax<T> implements interfaces.BindingOnSyntax<T> {
|
|
3
|
-
private readonly _binding;
|
|
4
|
-
constructor(binding: interfaces.Binding<T>);
|
|
5
|
-
onActivation(handler: interfaces.BindingActivation<T>): interfaces.BindingWhenSyntax<T>;
|
|
6
|
-
onDeactivation(handler: interfaces.BindingDeactivation<T>): interfaces.BindingWhenSyntax<T>;
|
|
7
|
-
}
|
|
8
|
-
export { BindingOnSyntax };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { BindingWhenSyntax } from './binding_when_syntax';
|
|
2
|
-
var BindingOnSyntax = (function () {
|
|
3
|
-
function BindingOnSyntax(binding) {
|
|
4
|
-
this._binding = binding;
|
|
5
|
-
}
|
|
6
|
-
BindingOnSyntax.prototype.onActivation = function (handler) {
|
|
7
|
-
this._binding.onActivation = handler;
|
|
8
|
-
return new BindingWhenSyntax(this._binding);
|
|
9
|
-
};
|
|
10
|
-
BindingOnSyntax.prototype.onDeactivation = function (handler) {
|
|
11
|
-
this._binding.onDeactivation = handler;
|
|
12
|
-
return new BindingWhenSyntax(this._binding);
|
|
13
|
-
};
|
|
14
|
-
return BindingOnSyntax;
|
|
15
|
-
}());
|
|
16
|
-
export { BindingOnSyntax };
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import * as ERROR_MSGS from '../constants/error_msgs';
|
|
2
|
-
import { BindingScopeEnum, BindingTypeEnum } from '../constants/literal_types';
|
|
3
|
-
import { BindingInWhenOnSyntax } from './binding_in_when_on_syntax';
|
|
4
|
-
import { BindingWhenOnSyntax } from './binding_when_on_syntax';
|
|
5
|
-
var BindingToSyntax = (function () {
|
|
6
|
-
function BindingToSyntax(binding) {
|
|
7
|
-
this._binding = binding;
|
|
8
|
-
}
|
|
9
|
-
BindingToSyntax.prototype.to = function (constructor) {
|
|
10
|
-
this._binding.type = BindingTypeEnum.Instance;
|
|
11
|
-
this._binding.implementationType = constructor;
|
|
12
|
-
return new BindingInWhenOnSyntax(this._binding);
|
|
13
|
-
};
|
|
14
|
-
BindingToSyntax.prototype.toSelf = function () {
|
|
15
|
-
if (typeof this._binding.serviceIdentifier !== 'function') {
|
|
16
|
-
throw new Error(ERROR_MSGS.INVALID_TO_SELF_VALUE);
|
|
17
|
-
}
|
|
18
|
-
var self = this._binding
|
|
19
|
-
.serviceIdentifier;
|
|
20
|
-
return this.to(self);
|
|
21
|
-
};
|
|
22
|
-
BindingToSyntax.prototype.toConstantValue = function (value) {
|
|
23
|
-
this._binding.type = BindingTypeEnum.ConstantValue;
|
|
24
|
-
this._binding.cache = value;
|
|
25
|
-
this._binding.dynamicValue = null;
|
|
26
|
-
this._binding.implementationType = null;
|
|
27
|
-
this._binding.scope = BindingScopeEnum.Singleton;
|
|
28
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
29
|
-
};
|
|
30
|
-
BindingToSyntax.prototype.toDynamicValue = function (func) {
|
|
31
|
-
this._binding.type = BindingTypeEnum.DynamicValue;
|
|
32
|
-
this._binding.cache = null;
|
|
33
|
-
this._binding.dynamicValue = func;
|
|
34
|
-
this._binding.implementationType = null;
|
|
35
|
-
return new BindingInWhenOnSyntax(this._binding);
|
|
36
|
-
};
|
|
37
|
-
BindingToSyntax.prototype.toConstructor = function (constructor) {
|
|
38
|
-
this._binding.type = BindingTypeEnum.Constructor;
|
|
39
|
-
this._binding.implementationType = constructor;
|
|
40
|
-
this._binding.scope = BindingScopeEnum.Singleton;
|
|
41
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
42
|
-
};
|
|
43
|
-
BindingToSyntax.prototype.toFactory = function (factory) {
|
|
44
|
-
this._binding.type = BindingTypeEnum.Factory;
|
|
45
|
-
this._binding.factory = factory;
|
|
46
|
-
this._binding.scope = BindingScopeEnum.Singleton;
|
|
47
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
48
|
-
};
|
|
49
|
-
BindingToSyntax.prototype.toFunction = function (func) {
|
|
50
|
-
if (typeof func !== 'function') {
|
|
51
|
-
throw new Error(ERROR_MSGS.INVALID_FUNCTION_BINDING);
|
|
52
|
-
}
|
|
53
|
-
var bindingWhenOnSyntax = this.toConstantValue(func);
|
|
54
|
-
this._binding.type = BindingTypeEnum.Function;
|
|
55
|
-
this._binding.scope = BindingScopeEnum.Singleton;
|
|
56
|
-
return bindingWhenOnSyntax;
|
|
57
|
-
};
|
|
58
|
-
BindingToSyntax.prototype.toAutoFactory = function (serviceIdentifier) {
|
|
59
|
-
this._binding.type = BindingTypeEnum.Factory;
|
|
60
|
-
this._binding.factory = function (context) {
|
|
61
|
-
var autofactory = function () {
|
|
62
|
-
return context.container.get(serviceIdentifier);
|
|
63
|
-
};
|
|
64
|
-
return autofactory;
|
|
65
|
-
};
|
|
66
|
-
this._binding.scope = BindingScopeEnum.Singleton;
|
|
67
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
68
|
-
};
|
|
69
|
-
BindingToSyntax.prototype.toAutoNamedFactory = function (serviceIdentifier) {
|
|
70
|
-
this._binding.type = BindingTypeEnum.Factory;
|
|
71
|
-
this._binding.factory = function (context) {
|
|
72
|
-
return function (named) {
|
|
73
|
-
return context.container.getNamed(serviceIdentifier, named);
|
|
74
|
-
};
|
|
75
|
-
};
|
|
76
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
77
|
-
};
|
|
78
|
-
BindingToSyntax.prototype.toProvider = function (provider) {
|
|
79
|
-
this._binding.type = BindingTypeEnum.Provider;
|
|
80
|
-
this._binding.provider = provider;
|
|
81
|
-
this._binding.scope = BindingScopeEnum.Singleton;
|
|
82
|
-
return new BindingWhenOnSyntax(this._binding);
|
|
83
|
-
};
|
|
84
|
-
BindingToSyntax.prototype.toService = function (service) {
|
|
85
|
-
this.toDynamicValue(function (context) {
|
|
86
|
-
return context.container.get(service);
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
return BindingToSyntax;
|
|
90
|
-
}());
|
|
91
|
-
export { BindingToSyntax };
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { interfaces } from '../interfaces/interfaces';
|
|
2
|
-
declare class BindingWhenOnSyntax<T> implements interfaces.BindingWhenSyntax<T>, interfaces.BindingOnSyntax<T> {
|
|
3
|
-
private readonly _bindingWhenSyntax;
|
|
4
|
-
private readonly _bindingOnSyntax;
|
|
5
|
-
private readonly _binding;
|
|
6
|
-
constructor(binding: interfaces.Binding<T>);
|
|
7
|
-
when(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
8
|
-
whenTargetNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
9
|
-
whenTargetIsDefault(): interfaces.BindingOnSyntax<T>;
|
|
10
|
-
whenTargetTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
11
|
-
whenInjectedInto(parent: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
12
|
-
whenParentNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
13
|
-
whenParentTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
14
|
-
whenAnyAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
15
|
-
whenNoAncestorIs(ancestor: NewableFunction | string): interfaces.BindingOnSyntax<T>;
|
|
16
|
-
whenAnyAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
17
|
-
whenAnyAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
18
|
-
whenNoAncestorNamed(name: string): interfaces.BindingOnSyntax<T>;
|
|
19
|
-
whenNoAncestorTagged(tag: string, value: unknown): interfaces.BindingOnSyntax<T>;
|
|
20
|
-
whenAnyAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
21
|
-
whenNoAncestorMatches(constraint: (request: interfaces.Request) => boolean): interfaces.BindingOnSyntax<T>;
|
|
22
|
-
onActivation(handler: (context: interfaces.Context, injectable: T) => T): interfaces.BindingWhenSyntax<T>;
|
|
23
|
-
onDeactivation(handler: (injectable: T) => Promise<void> | void): interfaces.BindingWhenSyntax<T>;
|
|
24
|
-
}
|
|
25
|
-
export { BindingWhenOnSyntax };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { BindingOnSyntax } from './binding_on_syntax';
|
|
2
|
-
import { BindingWhenSyntax } from './binding_when_syntax';
|
|
3
|
-
var BindingWhenOnSyntax = (function () {
|
|
4
|
-
function BindingWhenOnSyntax(binding) {
|
|
5
|
-
this._binding = binding;
|
|
6
|
-
this._bindingWhenSyntax = new BindingWhenSyntax(this._binding);
|
|
7
|
-
this._bindingOnSyntax = new BindingOnSyntax(this._binding);
|
|
8
|
-
}
|
|
9
|
-
BindingWhenOnSyntax.prototype.when = function (constraint) {
|
|
10
|
-
return this._bindingWhenSyntax.when(constraint);
|
|
11
|
-
};
|
|
12
|
-
BindingWhenOnSyntax.prototype.whenTargetNamed = function (name) {
|
|
13
|
-
return this._bindingWhenSyntax.whenTargetNamed(name);
|
|
14
|
-
};
|
|
15
|
-
BindingWhenOnSyntax.prototype.whenTargetIsDefault = function () {
|
|
16
|
-
return this._bindingWhenSyntax.whenTargetIsDefault();
|
|
17
|
-
};
|
|
18
|
-
BindingWhenOnSyntax.prototype.whenTargetTagged = function (tag, value) {
|
|
19
|
-
return this._bindingWhenSyntax.whenTargetTagged(tag, value);
|
|
20
|
-
};
|
|
21
|
-
BindingWhenOnSyntax.prototype.whenInjectedInto = function (parent) {
|
|
22
|
-
return this._bindingWhenSyntax.whenInjectedInto(parent);
|
|
23
|
-
};
|
|
24
|
-
BindingWhenOnSyntax.prototype.whenParentNamed = function (name) {
|
|
25
|
-
return this._bindingWhenSyntax.whenParentNamed(name);
|
|
26
|
-
};
|
|
27
|
-
BindingWhenOnSyntax.prototype.whenParentTagged = function (tag, value) {
|
|
28
|
-
return this._bindingWhenSyntax.whenParentTagged(tag, value);
|
|
29
|
-
};
|
|
30
|
-
BindingWhenOnSyntax.prototype.whenAnyAncestorIs = function (ancestor) {
|
|
31
|
-
return this._bindingWhenSyntax.whenAnyAncestorIs(ancestor);
|
|
32
|
-
};
|
|
33
|
-
BindingWhenOnSyntax.prototype.whenNoAncestorIs = function (ancestor) {
|
|
34
|
-
return this._bindingWhenSyntax.whenNoAncestorIs(ancestor);
|
|
35
|
-
};
|
|
36
|
-
BindingWhenOnSyntax.prototype.whenAnyAncestorNamed = function (name) {
|
|
37
|
-
return this._bindingWhenSyntax.whenAnyAncestorNamed(name);
|
|
38
|
-
};
|
|
39
|
-
BindingWhenOnSyntax.prototype.whenAnyAncestorTagged = function (tag, value) {
|
|
40
|
-
return this._bindingWhenSyntax.whenAnyAncestorTagged(tag, value);
|
|
41
|
-
};
|
|
42
|
-
BindingWhenOnSyntax.prototype.whenNoAncestorNamed = function (name) {
|
|
43
|
-
return this._bindingWhenSyntax.whenNoAncestorNamed(name);
|
|
44
|
-
};
|
|
45
|
-
BindingWhenOnSyntax.prototype.whenNoAncestorTagged = function (tag, value) {
|
|
46
|
-
return this._bindingWhenSyntax.whenNoAncestorTagged(tag, value);
|
|
47
|
-
};
|
|
48
|
-
BindingWhenOnSyntax.prototype.whenAnyAncestorMatches = function (constraint) {
|
|
49
|
-
return this._bindingWhenSyntax.whenAnyAncestorMatches(constraint);
|
|
50
|
-
};
|
|
51
|
-
BindingWhenOnSyntax.prototype.whenNoAncestorMatches = function (constraint) {
|
|
52
|
-
return this._bindingWhenSyntax.whenNoAncestorMatches(constraint);
|
|
53
|
-
};
|
|
54
|
-
BindingWhenOnSyntax.prototype.onActivation = function (handler) {
|
|
55
|
-
return this._bindingOnSyntax.onActivation(handler);
|
|
56
|
-
};
|
|
57
|
-
BindingWhenOnSyntax.prototype.onDeactivation = function (handler) {
|
|
58
|
-
return this._bindingOnSyntax.onDeactivation(handler);
|
|
59
|
-
};
|
|
60
|
-
return BindingWhenOnSyntax;
|
|
61
|
-
}());
|
|
62
|
-
export { BindingWhenOnSyntax };
|