@angular/core 13.0.0-next.7 → 13.0.0-rc.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/core.d.ts +599 -963
- package/esm2020/core.mjs +5 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
- package/esm2020/src/application_init.mjs +140 -0
- package/esm2020/src/application_module.mjs +135 -0
- package/esm2020/src/application_ref.mjs +738 -0
- package/{esm2015/src/application_tokens.js → esm2020/src/application_tokens.mjs} +0 -0
- package/esm2020/src/change_detection/change_detection.mjs +31 -0
- package/esm2020/src/change_detection/change_detection_util.mjs +64 -0
- package/esm2020/src/change_detection/change_detector_ref.mjs +89 -0
- package/{esm2015/src/change_detection/constants.js → esm2020/src/change_detection/constants.mjs} +0 -0
- package/esm2020/src/change_detection/differs/default_iterable_differ.mjs +666 -0
- package/{esm2015/src/change_detection/differs/default_keyvalue_differ.js → esm2020/src/change_detection/differs/default_keyvalue_differ.mjs} +0 -0
- package/{esm2015/src/change_detection/differs/iterable_differs.js → esm2020/src/change_detection/differs/iterable_differs.mjs} +0 -0
- package/{esm2015/src/change_detection/differs/keyvalue_differs.js → esm2020/src/change_detection/differs/keyvalue_differs.mjs} +0 -0
- package/{esm2015/src/change_detection/pipe_transform.js → esm2020/src/change_detection/pipe_transform.mjs} +0 -0
- package/esm2020/src/change_detection.mjs +14 -0
- package/esm2020/src/codegen_private_exports.mjs +11 -0
- package/{esm2015/src/compiler/compiler_facade.js → esm2020/src/compiler/compiler_facade.mjs} +0 -0
- package/{esm2015/src/compiler/compiler_facade_interface.js → esm2020/src/compiler/compiler_facade_interface.mjs} +1 -1
- package/esm2020/src/console.mjs +26 -0
- package/esm2020/src/core.mjs +52 -0
- package/esm2020/src/core_private_export.mjs +34 -0
- package/esm2020/src/core_render3_private_export.mjs +46 -0
- package/esm2020/src/debug/debug_node.mjs +625 -0
- package/{esm2015/src/debug/proxy.js → esm2020/src/debug/proxy.mjs} +0 -0
- package/{esm2015/src/di/forward_ref.js → esm2020/src/di/forward_ref.mjs} +0 -0
- package/{esm2015/src/di/index.js → esm2020/src/di/index.mjs} +0 -0
- package/{esm2015/src/di/inject_switch.js → esm2020/src/di/inject_switch.mjs} +0 -0
- package/esm2020/src/di/injectable.mjs +27 -0
- package/esm2020/src/di/injection_token.mjs +82 -0
- package/esm2020/src/di/injector.mjs +323 -0
- package/esm2020/src/di/injector_compatibility.mjs +185 -0
- package/{esm2015/src/di/injector_marker.js → esm2020/src/di/injector_marker.mjs} +0 -0
- package/{esm2015/src/di/injector_token.js → esm2020/src/di/injector_token.mjs} +0 -0
- package/{esm2015/src/di/interface/defs.js → esm2020/src/di/interface/defs.mjs} +0 -0
- package/{esm2015/src/di/interface/injector.js → esm2020/src/di/interface/injector.mjs} +0 -0
- package/{esm2015/src/di/interface/provider.js → esm2020/src/di/interface/provider.mjs} +0 -0
- package/{esm2015/src/di/jit/environment.js → esm2020/src/di/jit/environment.mjs} +0 -0
- package/esm2020/src/di/jit/injectable.mjs +94 -0
- package/{esm2015/src/di/jit/util.js → esm2020/src/di/jit/util.mjs} +0 -0
- package/esm2020/src/di/metadata.mjs +60 -0
- package/esm2020/src/di/metadata_attr.mjs +24 -0
- package/{esm2015/src/di/null_injector.js → esm2020/src/di/null_injector.mjs} +0 -0
- package/{esm2015/src/di/provider_token.js → esm2020/src/di/provider_token.mjs} +0 -0
- package/{esm2015/src/di/r3_injector.js → esm2020/src/di/r3_injector.mjs} +0 -0
- package/{esm2015/src/di/reflective_errors.js → esm2020/src/di/reflective_errors.mjs} +0 -0
- package/{esm2015/src/di/reflective_injector.js → esm2020/src/di/reflective_injector.mjs} +0 -0
- package/{esm2015/src/di/reflective_key.js → esm2020/src/di/reflective_key.mjs} +0 -0
- package/{esm2015/src/di/reflective_provider.js → esm2020/src/di/reflective_provider.mjs} +0 -0
- package/{esm2015/src/di/scope.js → esm2020/src/di/scope.mjs} +0 -0
- package/esm2020/src/di/util.mjs +51 -0
- package/{esm2015/src/di.js → esm2020/src/di.mjs} +0 -0
- package/{esm2015/src/error_handler.js → esm2020/src/error_handler.mjs} +0 -0
- package/{esm2015/src/errors.js → esm2020/src/errors.mjs} +0 -0
- package/esm2020/src/event_emitter.mjs +53 -0
- package/esm2020/src/i18n/locale_data_api.mjs +132 -0
- package/esm2020/src/i18n/locale_en.mjs +17 -0
- package/{esm2015/src/i18n/localization.js → esm2020/src/i18n/localization.mjs} +0 -0
- package/{esm2015/src/i18n/tokens.js → esm2020/src/i18n/tokens.mjs} +6 -6
- package/{esm2015/src/interface/lifecycle_hooks.js → esm2020/src/interface/lifecycle_hooks.mjs} +0 -0
- package/{esm2015/src/interface/simple_change.js → esm2020/src/interface/simple_change.mjs} +0 -0
- package/{esm2015/src/interface/type.js → esm2020/src/interface/type.mjs} +0 -0
- package/{esm2015/src/ivy_switch.js → esm2020/src/ivy_switch.mjs} +2 -2
- package/esm2020/src/linker/compiler.mjs +136 -0
- package/{esm2015/src/linker/component_factory.js → esm2020/src/linker/component_factory.mjs} +0 -0
- package/{esm2015/src/linker/component_factory_resolver.js → esm2020/src/linker/component_factory_resolver.mjs} +0 -0
- package/esm2020/src/linker/element_ref.mjs +59 -0
- package/esm2020/src/linker/ng_module_factory.mjs +29 -0
- package/esm2020/src/linker/ng_module_factory_loader.mjs +42 -0
- package/esm2020/src/linker/ng_module_factory_loader_impl.mjs +10 -0
- package/{esm2015/src/linker/ng_module_factory_registration.js → esm2020/src/linker/ng_module_factory_registration.mjs} +2 -2
- package/{esm2015/src/linker/query_list.js → esm2020/src/linker/query_list.mjs} +0 -0
- package/{esm2015/src/linker/template_ref.js → esm2020/src/linker/template_ref.mjs} +2 -2
- package/esm2020/src/linker/view_container_ref.mjs +283 -0
- package/{esm2015/src/linker/view_ref.js → esm2020/src/linker/view_ref.mjs} +0 -0
- package/esm2020/src/linker.mjs +19 -0
- package/esm2020/src/metadata/di.mjs +108 -0
- package/esm2020/src/metadata/directives.mjs +112 -0
- package/{esm2015/src/metadata/do_boostrap.js → esm2020/src/metadata/do_boostrap.mjs} +0 -0
- package/esm2020/src/metadata/ng_module.mjs +42 -0
- package/{esm2015/src/metadata/ng_module_def.js → esm2020/src/metadata/ng_module_def.mjs} +0 -0
- package/{esm2015/src/metadata/resource_loading.js → esm2020/src/metadata/resource_loading.mjs} +0 -0
- package/{esm2015/src/metadata/schema.js → esm2020/src/metadata/schema.mjs} +0 -0
- package/{esm2015/src/metadata/view.js → esm2020/src/metadata/view.mjs} +0 -0
- package/{esm2015/src/metadata.js → esm2020/src/metadata.mjs} +0 -0
- package/{esm2015/src/platform_core_providers.js → esm2020/src/platform_core_providers.mjs} +0 -0
- package/{esm2015/src/r3_symbols.js → esm2020/src/r3_symbols.mjs} +0 -0
- package/{esm2015/src/reflection/platform_reflection_capabilities.js → esm2020/src/reflection/platform_reflection_capabilities.mjs} +0 -0
- package/{esm2015/src/reflection/reflection.js → esm2020/src/reflection/reflection.mjs} +0 -0
- package/{esm2015/src/reflection/reflection_capabilities.js → esm2020/src/reflection/reflection_capabilities.mjs} +3 -3
- package/{esm2015/src/reflection/reflector.js → esm2020/src/reflection/reflector.mjs} +0 -0
- package/{esm2015/src/reflection/types.js → esm2020/src/reflection/types.mjs} +0 -0
- package/{esm2015/src/render/api.js → esm2020/src/render/api.mjs} +2 -2
- package/{esm2015/src/render/api_flags.js → esm2020/src/render/api_flags.mjs} +0 -0
- package/{esm2015/src/render.js → esm2020/src/render.mjs} +0 -0
- package/{esm2015/src/render3/assert.js → esm2020/src/render3/assert.mjs} +0 -0
- package/{esm2015/src/render3/bindings.js → esm2020/src/render3/bindings.mjs} +0 -0
- package/{esm2015/src/render3/collect_native_nodes.js → esm2020/src/render3/collect_native_nodes.mjs} +0 -0
- package/esm2020/src/render3/component.mjs +204 -0
- package/{esm2015/src/render3/component_ref.js → esm2020/src/render3/component_ref.mjs} +2 -2
- package/{esm2015/src/render3/context_discovery.js → esm2020/src/render3/context_discovery.mjs} +0 -0
- package/{esm2015/src/render3/definition.js → esm2020/src/render3/definition.mjs} +0 -0
- package/{esm2015/src/render3/definition_factory.js → esm2020/src/render3/definition_factory.mjs} +0 -0
- package/{esm2015/src/render3/di.js → esm2020/src/render3/di.mjs} +0 -0
- package/{esm2015/src/render3/di_setup.js → esm2020/src/render3/di_setup.mjs} +0 -0
- package/{esm2015/src/render3/error_code.js → esm2020/src/render3/error_code.mjs} +0 -0
- package/{esm2015/src/render3/errors.js → esm2020/src/render3/errors.mjs} +0 -0
- package/{esm2015/src/render3/errors_di.js → esm2020/src/render3/errors_di.mjs} +0 -0
- package/{esm2015/src/render3/features/copy_definition_feature.js → esm2020/src/render3/features/copy_definition_feature.mjs} +0 -0
- package/{esm2015/src/render3/features/inherit_definition_feature.js → esm2020/src/render3/features/inherit_definition_feature.mjs} +0 -0
- package/esm2020/src/render3/features/ng_onchanges_feature.mjs +92 -0
- package/{esm2015/src/render3/features/providers_feature.js → esm2020/src/render3/features/providers_feature.mjs} +0 -0
- package/{esm2015/src/render3/fields.js → esm2020/src/render3/fields.mjs} +0 -0
- package/{esm2015/src/render3/global_utils_api.js → esm2020/src/render3/global_utils_api.mjs} +0 -0
- package/{esm2015/src/render3/hooks.js → esm2020/src/render3/hooks.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_apply.js → esm2020/src/render3/i18n/i18n_apply.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_debug.js → esm2020/src/render3/i18n/i18n_debug.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_insert_before_index.js → esm2020/src/render3/i18n/i18n_insert_before_index.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_locale_id.js → esm2020/src/render3/i18n/i18n_locale_id.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_parse.js → esm2020/src/render3/i18n/i18n_parse.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_postprocess.js → esm2020/src/render3/i18n/i18n_postprocess.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_tree_shaking.js → esm2020/src/render3/i18n/i18n_tree_shaking.mjs} +0 -0
- package/{esm2015/src/render3/i18n/i18n_util.js → esm2020/src/render3/i18n/i18n_util.mjs} +0 -0
- package/{esm2015/src/render3/index.js → esm2020/src/render3/index.mjs} +0 -0
- package/{esm2015/src/render3/instructions/advance.js → esm2020/src/render3/instructions/advance.mjs} +0 -0
- package/{esm2015/src/render3/instructions/all.js → esm2020/src/render3/instructions/all.mjs} +0 -0
- package/{esm2015/src/render3/instructions/attribute.js → esm2020/src/render3/instructions/attribute.mjs} +0 -0
- package/{esm2015/src/render3/instructions/attribute_interpolation.js → esm2020/src/render3/instructions/attribute_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/change_detection.js → esm2020/src/render3/instructions/change_detection.mjs} +0 -0
- package/{esm2015/src/render3/instructions/class_map_interpolation.js → esm2020/src/render3/instructions/class_map_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/di.js → esm2020/src/render3/instructions/di.mjs} +0 -0
- package/{esm2015/src/render3/instructions/di_attr.js → esm2020/src/render3/instructions/di_attr.mjs} +0 -0
- package/{esm2015/src/render3/instructions/element.js → esm2020/src/render3/instructions/element.mjs} +0 -0
- package/{esm2015/src/render3/instructions/element_container.js → esm2020/src/render3/instructions/element_container.mjs} +0 -0
- package/{esm2015/src/render3/instructions/get_current_view.js → esm2020/src/render3/instructions/get_current_view.mjs} +0 -0
- package/{esm2015/src/render3/instructions/host_property.js → esm2020/src/render3/instructions/host_property.mjs} +0 -0
- package/{esm2015/src/render3/instructions/i18n.js → esm2020/src/render3/instructions/i18n.mjs} +0 -0
- package/{esm2015/src/render3/instructions/i18n_icu_container_visitor.js → esm2020/src/render3/instructions/i18n_icu_container_visitor.mjs} +0 -0
- package/{esm2015/src/render3/instructions/interpolation.js → esm2020/src/render3/instructions/interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/listener.js → esm2020/src/render3/instructions/listener.mjs} +0 -0
- package/{esm2015/src/render3/instructions/lview_debug.js → esm2020/src/render3/instructions/lview_debug.mjs} +0 -0
- package/{esm2015/src/render3/instructions/namespace.js → esm2020/src/render3/instructions/namespace.mjs} +0 -0
- package/{esm2015/src/render3/instructions/next_context.js → esm2020/src/render3/instructions/next_context.mjs} +0 -0
- package/{esm2015/src/render3/instructions/projection.js → esm2020/src/render3/instructions/projection.mjs} +0 -0
- package/{esm2015/src/render3/instructions/property.js → esm2020/src/render3/instructions/property.mjs} +0 -0
- package/{esm2015/src/render3/instructions/property_interpolation.js → esm2020/src/render3/instructions/property_interpolation.mjs} +0 -0
- package/esm2020/src/render3/instructions/shared.mjs +1811 -0
- package/{esm2015/src/render3/instructions/storage.js → esm2020/src/render3/instructions/storage.mjs} +0 -0
- package/{esm2015/src/render3/instructions/style_map_interpolation.js → esm2020/src/render3/instructions/style_map_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/style_prop_interpolation.js → esm2020/src/render3/instructions/style_prop_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/instructions/styling.js → esm2020/src/render3/instructions/styling.mjs} +0 -0
- package/{esm2015/src/render3/instructions/template.js → esm2020/src/render3/instructions/template.mjs} +0 -0
- package/{esm2015/src/render3/instructions/text.js → esm2020/src/render3/instructions/text.mjs} +0 -0
- package/{esm2015/src/render3/instructions/text_interpolation.js → esm2020/src/render3/instructions/text_interpolation.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/container.js → esm2020/src/render3/interfaces/container.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/context.js → esm2020/src/render3/interfaces/context.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/definition.js → esm2020/src/render3/interfaces/definition.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/document.js → esm2020/src/render3/interfaces/document.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/i18n.js → esm2020/src/render3/interfaces/i18n.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/injector.js → esm2020/src/render3/interfaces/injector.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/node.js → esm2020/src/render3/interfaces/node.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/player.js → esm2020/src/render3/interfaces/player.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/projection.js → esm2020/src/render3/interfaces/projection.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/public_definitions.js → esm2020/src/render3/interfaces/public_definitions.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/query.js → esm2020/src/render3/interfaces/query.mjs} +0 -0
- package/esm2020/src/render3/interfaces/renderer.mjs +27 -0
- package/{esm2015/src/render3/interfaces/renderer_dom.js → esm2020/src/render3/interfaces/renderer_dom.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/sanitization.js → esm2020/src/render3/interfaces/sanitization.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/styling.js → esm2020/src/render3/interfaces/styling.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/type_checks.js → esm2020/src/render3/interfaces/type_checks.mjs} +0 -0
- package/{esm2015/src/render3/interfaces/view.js → esm2020/src/render3/interfaces/view.mjs} +0 -0
- package/esm2020/src/render3/jit/directive.mjs +325 -0
- package/esm2020/src/render3/jit/environment.mjs +165 -0
- package/{esm2015/src/render3/jit/jit_options.js → esm2020/src/render3/jit/jit_options.mjs} +0 -0
- package/{esm2015/src/render3/jit/module.js → esm2020/src/render3/jit/module.mjs} +0 -0
- package/esm2020/src/render3/jit/partial.mjs +104 -0
- package/{esm2015/src/render3/jit/pipe.js → esm2020/src/render3/jit/pipe.mjs} +0 -0
- package/esm2020/src/render3/metadata.mjs +49 -0
- package/{esm2015/src/render3/namespaces.js → esm2020/src/render3/namespaces.mjs} +0 -0
- package/esm2020/src/render3/ng_module_ref.mjs +122 -0
- package/{esm2015/src/render3/node_assert.js → esm2020/src/render3/node_assert.mjs} +0 -0
- package/{esm2015/src/render3/node_manipulation.js → esm2020/src/render3/node_manipulation.mjs} +0 -0
- package/{esm2015/src/render3/node_manipulation_i18n.js → esm2020/src/render3/node_manipulation_i18n.mjs} +0 -0
- package/{esm2015/src/render3/node_selector_matcher.js → esm2020/src/render3/node_selector_matcher.mjs} +0 -0
- package/esm2020/src/render3/pipe.mjs +184 -0
- package/{esm2015/src/render3/profiler.js → esm2020/src/render3/profiler.mjs} +0 -0
- package/{esm2015/src/render3/pure_function.js → esm2020/src/render3/pure_function.mjs} +0 -0
- package/{esm2015/src/render3/query.js → esm2020/src/render3/query.mjs} +0 -0
- package/{esm2015/src/render3/state.js → esm2020/src/render3/state.mjs} +0 -0
- package/{esm2015/src/render3/styling/class_differ.js → esm2020/src/render3/styling/class_differ.mjs} +0 -0
- package/{esm2015/src/render3/styling/static_styling.js → esm2020/src/render3/styling/static_styling.mjs} +0 -0
- package/{esm2015/src/render3/styling/style_binding_list.js → esm2020/src/render3/styling/style_binding_list.mjs} +0 -0
- package/{esm2015/src/render3/styling/styling_parser.js → esm2020/src/render3/styling/styling_parser.mjs} +0 -0
- package/{esm2015/src/render3/tokens.js → esm2020/src/render3/tokens.mjs} +0 -0
- package/{esm2015/src/render3/util/attrs_utils.js → esm2020/src/render3/util/attrs_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/change_detection_utils.js → esm2020/src/render3/util/change_detection_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/debug_utils.js → esm2020/src/render3/util/debug_utils.mjs} +0 -0
- package/esm2020/src/render3/util/discovery_utils.mjs +411 -0
- package/esm2020/src/render3/util/global_utils.mjs +77 -0
- package/{esm2015/src/render3/util/injector_utils.js → esm2020/src/render3/util/injector_utils.mjs} +0 -0
- package/esm2020/src/render3/util/misc_utils.mjs +61 -0
- package/{esm2015/src/render3/util/stringify_utils.js → esm2020/src/render3/util/stringify_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/view_traversal_utils.js → esm2020/src/render3/util/view_traversal_utils.mjs} +0 -0
- package/{esm2015/src/render3/util/view_utils.js → esm2020/src/render3/util/view_utils.mjs} +0 -0
- package/{esm2015/src/render3/view_engine_compatibility_prebound.js → esm2020/src/render3/view_engine_compatibility_prebound.mjs} +1 -1
- package/{esm2015/src/render3/view_ref.js → esm2020/src/render3/view_ref.mjs} +0 -0
- package/{esm2015/src/sanitization/bypass.js → esm2020/src/sanitization/bypass.mjs} +0 -0
- package/{esm2015/src/sanitization/html_sanitizer.js → esm2020/src/sanitization/html_sanitizer.mjs} +0 -0
- package/{esm2015/src/sanitization/inert_body.js → esm2020/src/sanitization/inert_body.mjs} +3 -3
- package/{esm2015/src/sanitization/sanitization.js → esm2020/src/sanitization/sanitization.mjs} +0 -0
- package/{esm2015/src/sanitization/sanitizer.js → esm2020/src/sanitization/sanitizer.mjs} +0 -0
- package/{esm2015/src/sanitization/security.js → esm2020/src/sanitization/security.mjs} +0 -0
- package/{esm2015/src/sanitization/url_sanitizer.js → esm2020/src/sanitization/url_sanitizer.mjs} +0 -0
- package/esm2020/src/testability/testability.mjs +258 -0
- package/{esm2015/src/util/array_utils.js → esm2020/src/util/array_utils.mjs} +0 -0
- package/{esm2015/src/util/assert.js → esm2020/src/util/assert.mjs} +0 -0
- package/{esm2015/src/util/char_code.js → esm2020/src/util/char_code.mjs} +0 -0
- package/{esm2015/src/util/closure.js → esm2020/src/util/closure.mjs} +0 -0
- package/{esm2015/src/util/comparison.js → esm2020/src/util/comparison.mjs} +0 -0
- package/{esm2015/src/util/decorators.js → esm2020/src/util/decorators.mjs} +0 -0
- package/{esm2015/src/util/dom.js → esm2020/src/util/dom.mjs} +0 -0
- package/{esm2015/src/util/empty.js → esm2020/src/util/empty.mjs} +0 -0
- package/{esm2015/src/util/errors.js → esm2020/src/util/errors.mjs} +0 -0
- package/{esm2015/src/util/global.js → esm2020/src/util/global.mjs} +0 -0
- package/{esm2015/src/util/is_dev_mode.js → esm2020/src/util/is_dev_mode.mjs} +0 -0
- package/{esm2015/src/util/iterable.js → esm2020/src/util/iterable.mjs} +0 -0
- package/{esm2015/src/util/lang.js → esm2020/src/util/lang.mjs} +0 -0
- package/{esm2015/src/util/microtask.js → esm2020/src/util/microtask.mjs} +0 -0
- package/{esm2015/src/util/named_array_type.js → esm2020/src/util/named_array_type.mjs} +0 -0
- package/{esm2015/src/util/ng_dev_mode.js → esm2020/src/util/ng_dev_mode.mjs} +0 -0
- package/{esm2015/src/util/ng_i18n_closure_mode.js → esm2020/src/util/ng_i18n_closure_mode.mjs} +0 -0
- package/{esm2015/src/util/ng_jit_mode.js → esm2020/src/util/ng_jit_mode.mjs} +0 -0
- package/{esm2015/src/util/ng_reflect.js → esm2020/src/util/ng_reflect.mjs} +0 -0
- package/{esm2015/src/util/noop.js → esm2020/src/util/noop.mjs} +0 -0
- package/{esm2015/src/util/property.js → esm2020/src/util/property.mjs} +0 -0
- package/{esm2015/src/util/raf.js → esm2020/src/util/raf.mjs} +0 -0
- package/{esm2015/src/util/security/trusted_type_defs.js → esm2020/src/util/security/trusted_type_defs.mjs} +0 -0
- package/esm2020/src/util/security/trusted_types.mjs +130 -0
- package/esm2020/src/util/security/trusted_types_bypass.mjs +83 -0
- package/{esm2015/src/util/stringify.js → esm2020/src/util/stringify.mjs} +0 -0
- package/{esm2015/src/util/symbol.js → esm2020/src/util/symbol.mjs} +0 -0
- package/{esm2015/src/version.js → esm2020/src/version.mjs} +1 -1
- package/{esm2015/src/view/element.js → esm2020/src/view/element.mjs} +0 -0
- package/{esm2015/src/view/entrypoint.js → esm2020/src/view/entrypoint.mjs} +0 -0
- package/{esm2015/src/view/errors.js → esm2020/src/view/errors.mjs} +0 -0
- package/{esm2015/src/view/index.js → esm2020/src/view/index.mjs} +2 -2
- package/{esm2015/src/view/ng_content.js → esm2020/src/view/ng_content.mjs} +0 -0
- package/{esm2015/src/view/ng_module.js → esm2020/src/view/ng_module.mjs} +0 -0
- package/esm2020/src/view/provider.mjs +490 -0
- package/esm2020/src/view/provider_flags.mjs +26 -0
- package/{esm2015/src/view/pure_expression.js → esm2020/src/view/pure_expression.mjs} +0 -0
- package/{esm2015/src/view/query.js → esm2020/src/view/query.mjs} +0 -0
- package/esm2020/src/view/refs.mjs +369 -0
- package/{esm2015/src/view/services.js → esm2020/src/view/services.mjs} +0 -0
- package/{esm2015/src/view/text.js → esm2020/src/view/text.mjs} +0 -0
- package/{esm2015/src/view/types.js → esm2020/src/view/types.mjs} +0 -0
- package/esm2020/src/view/util.mjs +369 -0
- package/{esm2015/src/view/view.js → esm2020/src/view/view.mjs} +0 -0
- package/{esm2015/src/view/view_attach.js → esm2020/src/view/view_attach.mjs} +0 -0
- package/{esm2015/src/zone/ng_zone.js → esm2020/src/zone/ng_zone.mjs} +0 -0
- package/{esm2015/src/zone.js → esm2020/src/zone.mjs} +0 -0
- package/{esm2015/testing/index.js → esm2020/testing/index.mjs} +0 -0
- package/{esm2015/testing/public_api.js → esm2020/testing/public_api.mjs} +0 -0
- package/{esm2015/testing/src/async.js → esm2020/testing/src/async.mjs} +0 -0
- package/{esm2015/testing/src/component_fixture.js → esm2020/testing/src/component_fixture.mjs} +0 -0
- package/{esm2015/testing/src/fake_async.js → esm2020/testing/src/fake_async.mjs} +0 -0
- package/{esm2015/testing/src/lang_utils.js → esm2020/testing/src/lang_utils.mjs} +0 -0
- package/esm2020/testing/src/logger.mjs +34 -0
- package/{esm2015/testing/src/metadata_override.js → esm2020/testing/src/metadata_override.mjs} +0 -0
- package/{esm2015/testing/src/metadata_overrider.js → esm2020/testing/src/metadata_overrider.mjs} +0 -0
- package/esm2020/testing/src/ng_zone_mock.mjs +33 -0
- package/{esm2015/testing/src/private_export_testing.js → esm2020/testing/src/private_export_testing.mjs} +0 -0
- package/esm2020/testing/src/r3_test_bed.mjs +397 -0
- package/esm2020/testing/src/r3_test_bed_compiler.mjs +735 -0
- package/{esm2015/testing/src/resolvers.js → esm2020/testing/src/resolvers.mjs} +1 -1
- package/{esm2015/testing/src/styling.js → esm2020/testing/src/styling.mjs} +0 -0
- package/esm2020/testing/src/test_bed.mjs +614 -0
- package/esm2020/testing/src/test_bed_common.mjs +28 -0
- package/esm2020/testing/src/test_compiler.mjs +69 -0
- package/{esm2015/testing/src/test_hooks.js → esm2020/testing/src/test_hooks.mjs} +0 -0
- package/{esm2015/testing/src/testing.js → esm2020/testing/src/testing.mjs} +0 -0
- package/{esm2015/testing/src/testing_internal.js → esm2020/testing/src/testing_internal.mjs} +0 -0
- package/esm2020/testing/testing.mjs +5 -0
- package/fesm2015/{core.js → core.mjs} +8674 -8756
- package/fesm2015/core.mjs.map +1 -0
- package/fesm2015/{testing.js → testing.mjs} +50 -61
- package/fesm2015/testing.mjs.map +1 -0
- package/fesm2020/core.mjs +33107 -0
- package/fesm2020/core.mjs.map +1 -0
- package/fesm2020/testing.mjs +2635 -0
- package/fesm2020/testing.mjs.map +1 -0
- package/package.json +34 -9
- package/schematics/migrations/abstract-control-parent/index.js +6 -6
- package/schematics/migrations/abstract-control-parent/util.d.ts +1 -1
- package/schematics/migrations/abstract-control-parent/util.js +11 -8
- package/schematics/migrations/activated-route-snapshot-fragment/index.js +12 -9
- package/schematics/migrations/activated-route-snapshot-fragment/util.d.ts +1 -1
- package/schematics/migrations/activated-route-snapshot-fragment/util.js +10 -7
- package/schematics/migrations/can-activate-with-redirect-to/index.js +13 -10
- package/schematics/migrations/can-activate-with-redirect-to/util.d.ts +1 -1
- package/schematics/migrations/can-activate-with-redirect-to/util.js +13 -10
- package/schematics/migrations/deep-shadow-piercing-selector/index.js +3 -3
- package/schematics/migrations/dynamic-queries/index.js +13 -10
- package/schematics/migrations/dynamic-queries/util.d.ts +1 -1
- package/schematics/migrations/dynamic-queries/util.js +12 -9
- package/schematics/migrations/initial-navigation/collector.d.ts +1 -1
- package/schematics/migrations/initial-navigation/collector.js +23 -20
- package/schematics/migrations/initial-navigation/index.js +5 -5
- package/schematics/migrations/initial-navigation/transform.d.ts +1 -1
- package/schematics/migrations/initial-navigation/transform.js +11 -8
- package/schematics/migrations/initial-navigation/update_recorder.d.ts +1 -1
- package/schematics/migrations/initial-navigation/update_recorder.js +1 -1
- package/schematics/migrations/initial-navigation/util.d.ts +1 -1
- package/schematics/migrations/initial-navigation/util.js +10 -7
- package/schematics/migrations/missing-injectable/definition_collector.d.ts +1 -1
- package/schematics/migrations/missing-injectable/definition_collector.js +16 -13
- package/schematics/migrations/missing-injectable/index.js +26 -12
- package/schematics/migrations/missing-injectable/providers_evaluator.d.ts +9 -19
- package/schematics/migrations/missing-injectable/providers_evaluator.js +47 -40
- package/schematics/migrations/missing-injectable/transform.d.ts +3 -2
- package/schematics/migrations/missing-injectable/transform.js +18 -16
- package/schematics/migrations/missing-injectable/update_recorder.d.ts +1 -1
- package/schematics/migrations/missing-injectable/update_recorder.js +1 -1
- package/schematics/migrations/module-with-providers/collector.d.ts +1 -1
- package/schematics/migrations/module-with-providers/collector.js +12 -9
- package/schematics/migrations/module-with-providers/index.js +26 -12
- package/schematics/migrations/module-with-providers/transform.d.ts +4 -3
- package/schematics/migrations/module-with-providers/transform.js +23 -22
- package/schematics/migrations/module-with-providers/util.d.ts +1 -1
- package/schematics/migrations/module-with-providers/util.js +10 -7
- package/schematics/migrations/move-document/document_import_visitor.d.ts +1 -1
- package/schematics/migrations/move-document/document_import_visitor.js +7 -4
- package/schematics/migrations/move-document/index.js +8 -8
- package/schematics/migrations/move-document/move-import.d.ts +1 -1
- package/schematics/migrations/move-document/move-import.js +27 -24
- package/schematics/migrations/native-view-encapsulation/index.js +6 -6
- package/schematics/migrations/native-view-encapsulation/util.d.ts +1 -1
- package/schematics/migrations/native-view-encapsulation/util.js +8 -5
- package/schematics/migrations/navigation-extras-omissions/index.js +13 -10
- package/schematics/migrations/navigation-extras-omissions/util.d.ts +1 -1
- package/schematics/migrations/navigation-extras-omissions/util.js +17 -14
- package/schematics/migrations/relative-link-resolution/collector.d.ts +1 -1
- package/schematics/migrations/relative-link-resolution/collector.js +17 -14
- package/schematics/migrations/relative-link-resolution/index.js +5 -5
- package/schematics/migrations/relative-link-resolution/transform.d.ts +1 -1
- package/schematics/migrations/relative-link-resolution/transform.js +12 -9
- package/schematics/migrations/relative-link-resolution/update_recorder.d.ts +1 -1
- package/schematics/migrations/relative-link-resolution/update_recorder.js +1 -1
- package/schematics/migrations/relative-link-resolution/util.d.ts +1 -1
- package/schematics/migrations/relative-link-resolution/util.js +10 -7
- package/schematics/migrations/renderer-to-renderer2/helpers.d.ts +1 -1
- package/schematics/migrations/renderer-to-renderer2/helpers.js +92 -89
- package/schematics/migrations/renderer-to-renderer2/index.js +20 -17
- package/schematics/migrations/renderer-to-renderer2/migration.d.ts +1 -1
- package/schematics/migrations/renderer-to-renderer2/migration.js +33 -30
- package/schematics/migrations/renderer-to-renderer2/util.d.ts +1 -1
- package/schematics/migrations/renderer-to-renderer2/util.js +23 -20
- package/schematics/migrations/router-link-empty-expression/analyze_template.d.ts +2 -2
- package/schematics/migrations/router-link-empty-expression/analyze_template.js +6 -7
- package/schematics/migrations/router-link-empty-expression/angular/html_routerlink_empty_expr_visitor.d.ts +7 -6
- package/schematics/migrations/router-link-empty-expression/angular/html_routerlink_empty_expr_visitor.js +10 -11
- package/schematics/migrations/router-link-empty-expression/index.js +27 -16
- package/schematics/migrations/router-preserve-query-params/index.js +13 -10
- package/schematics/migrations/router-preserve-query-params/util.d.ts +1 -1
- package/schematics/migrations/router-preserve-query-params/util.js +19 -16
- package/schematics/migrations/static-queries/angular/directive_inputs.d.ts +1 -1
- package/schematics/migrations/static-queries/angular/directive_inputs.js +14 -11
- package/schematics/migrations/static-queries/angular/ng_query_visitor.d.ts +1 -1
- package/schematics/migrations/static-queries/angular/ng_query_visitor.js +17 -14
- package/schematics/migrations/static-queries/angular/query-definition.d.ts +1 -1
- package/schematics/migrations/static-queries/angular/query-definition.js +1 -1
- package/schematics/migrations/static-queries/angular/super_class.d.ts +1 -1
- package/schematics/migrations/static-queries/angular/super_class.js +1 -1
- package/schematics/migrations/static-queries/index.js +43 -18
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.d.ts +6 -3
- package/schematics/migrations/static-queries/strategies/template_strategy/template_strategy.js +44 -48
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.d.ts +1 -1
- package/schematics/migrations/static-queries/strategies/usage_strategy/declaration_usage_visitor.js +41 -38
- package/schematics/migrations/static-queries/strategies/usage_strategy/super_class_context.d.ts +1 -1
- package/schematics/migrations/static-queries/strategies/usage_strategy/super_class_context.js +10 -7
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.d.ts +10 -9
- package/schematics/migrations/static-queries/strategies/usage_strategy/template_usage_visitor.js +35 -36
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.d.ts +3 -2
- package/schematics/migrations/static-queries/strategies/usage_strategy/usage_strategy.js +14 -10
- package/schematics/migrations/static-queries/transform.d.ts +1 -1
- package/schematics/migrations/static-queries/transform.js +14 -11
- package/schematics/migrations/template-var-assignment/analyze_template.d.ts +2 -2
- package/schematics/migrations/template-var-assignment/analyze_template.js +6 -7
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.d.ts +7 -6
- package/schematics/migrations/template-var-assignment/angular/html_variable_assignment_visitor.js +31 -30
- package/schematics/migrations/template-var-assignment/index.js +20 -9
- package/schematics/migrations/testbed-teardown/index.d.ts +11 -0
- package/schematics/migrations/testbed-teardown/index.js +92 -0
- package/schematics/migrations/testbed-teardown/util.d.ts +35 -0
- package/schematics/migrations/testbed-teardown/util.js +188 -0
- package/schematics/migrations/undecorated-classes-with-decorated-fields/index.js +26 -12
- package/schematics/migrations/undecorated-classes-with-decorated-fields/transform.d.ts +3 -2
- package/schematics/migrations/undecorated-classes-with-decorated-fields/transform.js +23 -21
- package/schematics/migrations/undecorated-classes-with-decorated-fields/update_recorder.d.ts +1 -1
- package/schematics/migrations/undecorated-classes-with-decorated-fields/update_recorder.js +1 -1
- package/schematics/migrations/undecorated-classes-with-di/create_ngc_program.d.ts +4 -4
- package/schematics/migrations/undecorated-classes-with-di/create_ngc_program.js +5 -6
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/convert_directive_metadata.d.ts +3 -3
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/convert_directive_metadata.js +18 -16
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/decorator_rewriter.d.ts +3 -5
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/decorator_rewriter.js +13 -11
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/import_rewrite_visitor.d.ts +2 -2
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/import_rewrite_visitor.js +18 -15
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/path_format.js +2 -2
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/source_file_exports.d.ts +1 -1
- package/schematics/migrations/undecorated-classes-with-di/decorator_rewrite/source_file_exports.js +16 -13
- package/schematics/migrations/undecorated-classes-with-di/index.js +64 -22
- package/schematics/migrations/undecorated-classes-with-di/ng_declaration_collector.d.ts +4 -4
- package/schematics/migrations/undecorated-classes-with-di/ng_declaration_collector.js +28 -35
- package/schematics/migrations/undecorated-classes-with-di/transform.d.ts +5 -5
- package/schematics/migrations/undecorated-classes-with-di/transform.js +29 -26
- package/schematics/migrations/undecorated-classes-with-di/update_recorder.d.ts +1 -1
- package/schematics/migrations/undecorated-classes-with-di/update_recorder.js +1 -1
- package/schematics/migrations/wait-for-async/index.js +16 -13
- package/schematics/migrations/wait-for-async/util.d.ts +1 -1
- package/schematics/migrations/wait-for-async/util.js +9 -6
- package/schematics/migrations/xhr-factory/index.js +13 -10
- package/schematics/migrations.json +6 -1
- package/schematics/package.json +3 -0
- package/schematics/utils/import_manager.d.ts +1 -1
- package/schematics/utils/import_manager.js +24 -21
- package/schematics/utils/load_esm.d.ts +32 -0
- package/schematics/utils/load_esm.js +79 -0
- package/schematics/utils/ng_component_template.d.ts +1 -1
- package/schematics/utils/ng_component_template.js +21 -18
- package/schematics/utils/ng_decorators.d.ts +1 -1
- package/schematics/utils/ng_decorators.js +2 -2
- package/schematics/utils/parse_html.d.ts +2 -2
- package/schematics/utils/parse_html.js +4 -5
- package/schematics/utils/project_tsconfig_paths.js +3 -3
- package/schematics/utils/template_ast_visitor.d.ts +55 -0
- package/schematics/utils/template_ast_visitor.js +73 -0
- package/schematics/utils/typescript/class_declaration.d.ts +1 -1
- package/schematics/utils/typescript/class_declaration.js +10 -7
- package/schematics/utils/typescript/compiler_host.d.ts +1 -1
- package/schematics/utils/typescript/compiler_host.js +11 -8
- package/schematics/utils/typescript/decorators.d.ts +1 -1
- package/schematics/utils/typescript/decorators.js +8 -5
- package/schematics/utils/typescript/find_base_classes.d.ts +1 -1
- package/schematics/utils/typescript/find_base_classes.js +7 -4
- package/schematics/utils/typescript/functions.d.ts +1 -1
- package/schematics/utils/typescript/functions.js +9 -6
- package/schematics/utils/typescript/imports.d.ts +1 -1
- package/schematics/utils/typescript/imports.js +12 -9
- package/schematics/utils/typescript/nodes.d.ts +1 -1
- package/schematics/utils/typescript/nodes.js +11 -8
- package/schematics/utils/typescript/parse_tsconfig.d.ts +1 -1
- package/schematics/utils/typescript/parse_tsconfig.js +31 -9
- package/schematics/utils/typescript/property_name.d.ts +1 -1
- package/schematics/utils/typescript/property_name.js +7 -4
- package/schematics/utils/typescript/symbol.d.ts +1 -1
- package/schematics/utils/typescript/symbol.js +15 -12
- package/testing/package.json +5 -5
- package/testing/testing.d.ts +57 -339
- package/bundles/core-testing.umd.js +0 -3179
- package/bundles/core-testing.umd.js.map +0 -1
- package/bundles/core.umd.js +0 -34488
- package/bundles/core.umd.js.map +0 -1
- package/core.metadata.json +0 -1
- package/esm2015/core.externs.js +0 -6
- package/esm2015/core.js +0 -38
- package/esm2015/src/application_init.js +0 -142
- package/esm2015/src/application_module.js +0 -134
- package/esm2015/src/application_ref.js +0 -735
- package/esm2015/src/change_detection/change_detection.js +0 -31
- package/esm2015/src/change_detection/change_detection_util.js +0 -105
- package/esm2015/src/change_detection/change_detector_ref.js +0 -96
- package/esm2015/src/change_detection/differs/default_iterable_differ.js +0 -668
- package/esm2015/src/change_detection.js +0 -14
- package/esm2015/src/codegen_private_exports.js +0 -11
- package/esm2015/src/compiler/compiler.externs.js +0 -0
- package/esm2015/src/console.js +0 -23
- package/esm2015/src/core.js +0 -50
- package/esm2015/src/core_private_export.js +0 -35
- package/esm2015/src/core_render3_private_export.js +0 -45
- package/esm2015/src/debug/debug_node.js +0 -632
- package/esm2015/src/di/injectable.js +0 -36
- package/esm2015/src/di/injection_token.js +0 -75
- package/esm2015/src/di/injector.js +0 -326
- package/esm2015/src/di/injector_compatibility.js +0 -187
- package/esm2015/src/di/interface/interface.externs.js +0 -0
- package/esm2015/src/di/jit/injectable.js +0 -96
- package/esm2015/src/di/metadata.js +0 -62
- package/esm2015/src/di/metadata_attr.js +0 -24
- package/esm2015/src/di/util.js +0 -53
- package/esm2015/src/event_emitter.js +0 -54
- package/esm2015/src/i18n/locale_data_api.js +0 -131
- package/esm2015/src/i18n/locale_en.js +0 -17
- package/esm2015/src/interface/interface.externs.js +0 -0
- package/esm2015/src/linker/compiler.js +0 -118
- package/esm2015/src/linker/element_ref.js +0 -66
- package/esm2015/src/linker/ng_module_factory.js +0 -21
- package/esm2015/src/linker/ng_module_factory_loader.js +0 -41
- package/esm2015/src/linker/system_js_ng_module_factory_loader.js +0 -77
- package/esm2015/src/linker/view_container_ref.js +0 -252
- package/esm2015/src/linker.js +0 -20
- package/esm2015/src/metadata/di.js +0 -99
- package/esm2015/src/metadata/directives.js +0 -120
- package/esm2015/src/metadata/ng_module.js +0 -44
- package/esm2015/src/reflection/reflection.externs.js +0 -0
- package/esm2015/src/render3/component.js +0 -206
- package/esm2015/src/render3/features/ng_onchanges_feature.js +0 -92
- package/esm2015/src/render3/instructions/shared.js +0 -1813
- package/esm2015/src/render3/interfaces/renderer.js +0 -29
- package/esm2015/src/render3/jit/directive.js +0 -312
- package/esm2015/src/render3/jit/environment.js +0 -167
- package/esm2015/src/render3/jit/partial.js +0 -105
- package/esm2015/src/render3/metadata.js +0 -49
- package/esm2015/src/render3/ng_module_ref.js +0 -108
- package/esm2015/src/render3/pipe.js +0 -202
- package/esm2015/src/render3/util/discovery_utils.js +0 -411
- package/esm2015/src/render3/util/global_utils.js +0 -78
- package/esm2015/src/render3/util/misc_utils.js +0 -63
- package/esm2015/src/testability/testability.js +0 -256
- package/esm2015/src/util/security/trusted_types.js +0 -133
- package/esm2015/src/util/security/trusted_types_bypass.js +0 -86
- package/esm2015/src/util/util.externs.js +0 -0
- package/esm2015/src/view/provider.js +0 -507
- package/esm2015/src/view/refs.js +0 -362
- package/esm2015/src/view/util.js +0 -378
- package/esm2015/testing/src/logger.js +0 -32
- package/esm2015/testing/src/ng_zone_mock.js +0 -31
- package/esm2015/testing/src/r3_test_bed.js +0 -397
- package/esm2015/testing/src/r3_test_bed_compiler.js +0 -744
- package/esm2015/testing/src/test_bed.js +0 -608
- package/esm2015/testing/src/test_bed_common.js +0 -31
- package/esm2015/testing/src/test_compiler.js +0 -66
- package/esm2015/testing/testing.externs.js +0 -6
- package/esm2015/testing/testing.js +0 -7
- package/fesm2015/core.js.map +0 -1
- package/fesm2015/testing.js.map +0 -1
- package/src/r3_symbols.d.ts +0 -1025
- package/testing/testing.metadata.json +0 -1
- package/testing.d.ts +0 -7
- package/testing.metadata.json +0 -1
package/src/r3_symbols.d.ts
DELETED
|
@@ -1,1025 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license Angular v13.0.0-next.7
|
|
3
|
-
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
|
-
* License: MIT
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @description
|
|
9
|
-
*
|
|
10
|
-
* Represents an abstract class `T`, if applied to a concrete class it would stop being
|
|
11
|
-
* instantiable.
|
|
12
|
-
*
|
|
13
|
-
* @publicApi
|
|
14
|
-
*/
|
|
15
|
-
declare interface AbstractType<T> extends Function {
|
|
16
|
-
prototype: T;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Base class that provides change detection functionality.
|
|
21
|
-
* A change-detection tree collects all views that are to be checked for changes.
|
|
22
|
-
* Use the methods to add and remove views from the tree, initiate change-detection,
|
|
23
|
-
* and explicitly mark views as _dirty_, meaning that they have changed and need to be re-rendered.
|
|
24
|
-
*
|
|
25
|
-
* @see [Using change detection hooks](guide/lifecycle-hooks#using-change-detection-hooks)
|
|
26
|
-
* @see [Defining custom change detection](guide/lifecycle-hooks#defining-custom-change-detection)
|
|
27
|
-
*
|
|
28
|
-
* @usageNotes
|
|
29
|
-
*
|
|
30
|
-
* The following examples demonstrate how to modify default change-detection behavior
|
|
31
|
-
* to perform explicit detection when needed.
|
|
32
|
-
*
|
|
33
|
-
* ### Use `markForCheck()` with `CheckOnce` strategy
|
|
34
|
-
*
|
|
35
|
-
* The following example sets the `OnPush` change-detection strategy for a component
|
|
36
|
-
* (`CheckOnce`, rather than the default `CheckAlways`), then forces a second check
|
|
37
|
-
* after an interval. See [live demo](https://plnkr.co/edit/GC512b?p=preview).
|
|
38
|
-
*
|
|
39
|
-
* <code-example path="core/ts/change_detect/change-detection.ts"
|
|
40
|
-
* region="mark-for-check"></code-example>
|
|
41
|
-
*
|
|
42
|
-
* ### Detach change detector to limit how often check occurs
|
|
43
|
-
*
|
|
44
|
-
* The following example defines a component with a large list of read-only data
|
|
45
|
-
* that is expected to change constantly, many times per second.
|
|
46
|
-
* To improve performance, we want to check and update the list
|
|
47
|
-
* less often than the changes actually occur. To do that, we detach
|
|
48
|
-
* the component's change detector and perform an explicit local check every five seconds.
|
|
49
|
-
*
|
|
50
|
-
* <code-example path="core/ts/change_detect/change-detection.ts" region="detach"></code-example>
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* ### Reattaching a detached component
|
|
54
|
-
*
|
|
55
|
-
* The following example creates a component displaying live data.
|
|
56
|
-
* The component detaches its change detector from the main change detector tree
|
|
57
|
-
* when the `live` property is set to false, and reattaches it when the property
|
|
58
|
-
* becomes true.
|
|
59
|
-
*
|
|
60
|
-
* <code-example path="core/ts/change_detect/change-detection.ts" region="reattach"></code-example>
|
|
61
|
-
*
|
|
62
|
-
* @publicApi
|
|
63
|
-
*/
|
|
64
|
-
declare abstract class ChangeDetectorRef {
|
|
65
|
-
/**
|
|
66
|
-
* When a view uses the {@link ChangeDetectionStrategy#OnPush OnPush} (checkOnce)
|
|
67
|
-
* change detection strategy, explicitly marks the view as changed so that
|
|
68
|
-
* it can be checked again.
|
|
69
|
-
*
|
|
70
|
-
* Components are normally marked as dirty (in need of rerendering) when inputs
|
|
71
|
-
* have changed or events have fired in the view. Call this method to ensure that
|
|
72
|
-
* a component is checked even if these triggers have not occured.
|
|
73
|
-
*
|
|
74
|
-
* <!-- TODO: Add a link to a chapter on OnPush components -->
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
abstract markForCheck(): void;
|
|
78
|
-
/**
|
|
79
|
-
* Detaches this view from the change-detection tree.
|
|
80
|
-
* A detached view is not checked until it is reattached.
|
|
81
|
-
* Use in combination with `detectChanges()` to implement local change detection checks.
|
|
82
|
-
*
|
|
83
|
-
* Detached views are not checked during change detection runs until they are
|
|
84
|
-
* re-attached, even if they are marked as dirty.
|
|
85
|
-
*
|
|
86
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
87
|
-
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
88
|
-
*
|
|
89
|
-
*/
|
|
90
|
-
abstract detach(): void;
|
|
91
|
-
/**
|
|
92
|
-
* Checks this view and its children. Use in combination with {@link ChangeDetectorRef#detach
|
|
93
|
-
* detach}
|
|
94
|
-
* to implement local change detection checks.
|
|
95
|
-
*
|
|
96
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
97
|
-
* <!-- TODO: Add a live demo once ref.detectChanges is merged into master -->
|
|
98
|
-
*
|
|
99
|
-
*/
|
|
100
|
-
abstract detectChanges(): void;
|
|
101
|
-
/**
|
|
102
|
-
* Checks the change detector and its children, and throws if any changes are detected.
|
|
103
|
-
*
|
|
104
|
-
* Use in development mode to verify that running change detection doesn't introduce
|
|
105
|
-
* other changes.
|
|
106
|
-
*/
|
|
107
|
-
abstract checkNoChanges(): void;
|
|
108
|
-
/**
|
|
109
|
-
* Re-attaches the previously detached view to the change detection tree.
|
|
110
|
-
* Views are attached to the tree by default.
|
|
111
|
-
*
|
|
112
|
-
* <!-- TODO: Add a link to a chapter on detach/reattach/local digest -->
|
|
113
|
-
*
|
|
114
|
-
*/
|
|
115
|
-
abstract reattach(): void;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Base class for a factory that can create a component dynamically.
|
|
120
|
-
* Instantiate a factory for a given type of component with `resolveComponentFactory()`.
|
|
121
|
-
* Use the resulting `ComponentFactory.create()` method to create a component of that type.
|
|
122
|
-
*
|
|
123
|
-
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
124
|
-
*
|
|
125
|
-
* @publicApi
|
|
126
|
-
*/
|
|
127
|
-
declare abstract class ComponentFactory<C> {
|
|
128
|
-
/**
|
|
129
|
-
* The component's HTML selector.
|
|
130
|
-
*/
|
|
131
|
-
abstract get selector(): string;
|
|
132
|
-
/**
|
|
133
|
-
* The type of component the factory will create.
|
|
134
|
-
*/
|
|
135
|
-
abstract get componentType(): Type<any>;
|
|
136
|
-
/**
|
|
137
|
-
* Selector for all <ng-content> elements in the component.
|
|
138
|
-
*/
|
|
139
|
-
abstract get ngContentSelectors(): string[];
|
|
140
|
-
/**
|
|
141
|
-
* The inputs of the component.
|
|
142
|
-
*/
|
|
143
|
-
abstract get inputs(): {
|
|
144
|
-
propName: string;
|
|
145
|
-
templateName: string;
|
|
146
|
-
}[];
|
|
147
|
-
/**
|
|
148
|
-
* The outputs of the component.
|
|
149
|
-
*/
|
|
150
|
-
abstract get outputs(): {
|
|
151
|
-
propName: string;
|
|
152
|
-
templateName: string;
|
|
153
|
-
}[];
|
|
154
|
-
/**
|
|
155
|
-
* Creates a new component.
|
|
156
|
-
*/
|
|
157
|
-
abstract create(injector: Injector, projectableNodes?: any[][], rootSelectorOrNode?: string | any, ngModule?: NgModuleRef<any>): ComponentRef<C>;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* A simple registry that maps `Components` to generated `ComponentFactory` classes
|
|
162
|
-
* that can be used to create instances of components.
|
|
163
|
-
* Use to obtain the factory for a given component type,
|
|
164
|
-
* then use the factory's `create()` method to create a component of that type.
|
|
165
|
-
*
|
|
166
|
-
* @see [Dynamic Components](guide/dynamic-component-loader)
|
|
167
|
-
* @see [Usage Example](guide/dynamic-component-loader#resolving-components)
|
|
168
|
-
* @see <live-example name="dynamic-component-loader" noDownload></live-example>
|
|
169
|
-
of the code in this cookbook
|
|
170
|
-
* @publicApi
|
|
171
|
-
*/
|
|
172
|
-
declare abstract class ComponentFactoryResolver {
|
|
173
|
-
static NULL: ComponentFactoryResolver;
|
|
174
|
-
/**
|
|
175
|
-
* Retrieves the factory object that creates a component of the given type.
|
|
176
|
-
* @param component The component type.
|
|
177
|
-
*/
|
|
178
|
-
abstract resolveComponentFactory<T>(component: Type<T>): ComponentFactory<T>;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/**
|
|
182
|
-
* Represents a component created by a `ComponentFactory`.
|
|
183
|
-
* Provides access to the component instance and related objects,
|
|
184
|
-
* and provides the means of destroying the instance.
|
|
185
|
-
*
|
|
186
|
-
* @publicApi
|
|
187
|
-
*/
|
|
188
|
-
declare abstract class ComponentRef<C> {
|
|
189
|
-
/**
|
|
190
|
-
* The host or anchor [element](guide/glossary#element) for this component instance.
|
|
191
|
-
*/
|
|
192
|
-
abstract get location(): ElementRef;
|
|
193
|
-
/**
|
|
194
|
-
* The [dependency injector](guide/glossary#injector) for this component instance.
|
|
195
|
-
*/
|
|
196
|
-
abstract get injector(): Injector;
|
|
197
|
-
/**
|
|
198
|
-
* This component instance.
|
|
199
|
-
*/
|
|
200
|
-
abstract get instance(): C;
|
|
201
|
-
/**
|
|
202
|
-
* The [host view](guide/glossary#view-tree) defined by the template
|
|
203
|
-
* for this component instance.
|
|
204
|
-
*/
|
|
205
|
-
abstract get hostView(): ViewRef;
|
|
206
|
-
/**
|
|
207
|
-
* The change detector for this component instance.
|
|
208
|
-
*/
|
|
209
|
-
abstract get changeDetectorRef(): ChangeDetectorRef;
|
|
210
|
-
/**
|
|
211
|
-
* The type of this component (as created by a `ComponentFactory` class).
|
|
212
|
-
*/
|
|
213
|
-
abstract get componentType(): Type<any>;
|
|
214
|
-
/**
|
|
215
|
-
* Destroys the component instance and all of the data structures associated with it.
|
|
216
|
-
*/
|
|
217
|
-
abstract destroy(): void;
|
|
218
|
-
/**
|
|
219
|
-
* A lifecycle hook that provides additional developer-defined cleanup
|
|
220
|
-
* functionality for the component.
|
|
221
|
-
* @param callback A handler function that cleans up developer-defined data
|
|
222
|
-
* associated with this component. Called when the `destroy()` method is invoked.
|
|
223
|
-
*/
|
|
224
|
-
abstract onDestroy(callback: Function): void;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* Configures the `Injector` to return an instance of a token.
|
|
229
|
-
*
|
|
230
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
231
|
-
*
|
|
232
|
-
* @usageNotes
|
|
233
|
-
*
|
|
234
|
-
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
235
|
-
*
|
|
236
|
-
* ### Multi-value example
|
|
237
|
-
*
|
|
238
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
239
|
-
*
|
|
240
|
-
* @publicApi
|
|
241
|
-
*/
|
|
242
|
-
declare interface ConstructorProvider extends ConstructorSansProvider {
|
|
243
|
-
/**
|
|
244
|
-
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
245
|
-
*/
|
|
246
|
-
provide: Type<any>;
|
|
247
|
-
/**
|
|
248
|
-
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
249
|
-
* providers spread across many files to provide configuration information to a common token.
|
|
250
|
-
*/
|
|
251
|
-
multi?: boolean;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/**
|
|
255
|
-
* Configures the `Injector` to return an instance of a token.
|
|
256
|
-
*
|
|
257
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
258
|
-
*
|
|
259
|
-
* @usageNotes
|
|
260
|
-
*
|
|
261
|
-
* ```ts
|
|
262
|
-
* @Injectable(SomeModule, {deps: []})
|
|
263
|
-
* class MyService {}
|
|
264
|
-
* ```
|
|
265
|
-
*
|
|
266
|
-
* @publicApi
|
|
267
|
-
*/
|
|
268
|
-
declare interface ConstructorSansProvider {
|
|
269
|
-
/**
|
|
270
|
-
* A list of `token`s to be resolved by the injector.
|
|
271
|
-
*/
|
|
272
|
-
deps?: any[];
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
/**
|
|
276
|
-
* An object literal of this type is used to represent the metadata of a constructor dependency.
|
|
277
|
-
* The type itself is never referred to from generated code.
|
|
278
|
-
*
|
|
279
|
-
* @publicApi
|
|
280
|
-
*/
|
|
281
|
-
declare type CtorDependency = {
|
|
282
|
-
/**
|
|
283
|
-
* If an `@Attribute` decorator is used, this represents the injected attribute's name. If the
|
|
284
|
-
* attribute name is a dynamic expression instead of a string literal, this will be the unknown
|
|
285
|
-
* type.
|
|
286
|
-
*/
|
|
287
|
-
attribute?: string | unknown;
|
|
288
|
-
/**
|
|
289
|
-
* If `@Optional()` is used, this key is set to true.
|
|
290
|
-
*/
|
|
291
|
-
optional?: true;
|
|
292
|
-
/**
|
|
293
|
-
* If `@Host` is used, this key is set to true.
|
|
294
|
-
*/
|
|
295
|
-
host?: true;
|
|
296
|
-
/**
|
|
297
|
-
* If `@Self` is used, this key is set to true.
|
|
298
|
-
*/
|
|
299
|
-
self?: true;
|
|
300
|
-
/**
|
|
301
|
-
* If `@SkipSelf` is used, this key is set to true.
|
|
302
|
-
*/
|
|
303
|
-
skipSelf?: true;
|
|
304
|
-
} | null;
|
|
305
|
-
|
|
306
|
-
/**
|
|
307
|
-
* A wrapper around a native element inside of a View.
|
|
308
|
-
*
|
|
309
|
-
* An `ElementRef` is backed by a render-specific element. In the browser, this is usually a DOM
|
|
310
|
-
* element.
|
|
311
|
-
*
|
|
312
|
-
* @security Permitting direct access to the DOM can make your application more vulnerable to
|
|
313
|
-
* XSS attacks. Carefully review any use of `ElementRef` in your code. For more detail, see the
|
|
314
|
-
* [Security Guide](https://g.co/ng/security).
|
|
315
|
-
*
|
|
316
|
-
* @publicApi
|
|
317
|
-
*/
|
|
318
|
-
declare class ElementRef<T = any> {
|
|
319
|
-
/**
|
|
320
|
-
* The underlying native element or `null` if direct access to native elements is not supported
|
|
321
|
-
* (e.g. when the application runs in a web worker).
|
|
322
|
-
*
|
|
323
|
-
* <div class="callout is-critical">
|
|
324
|
-
* <header>Use with caution</header>
|
|
325
|
-
* <p>
|
|
326
|
-
* Use this API as the last resort when direct access to DOM is needed. Use templating and
|
|
327
|
-
* data-binding provided by Angular instead. Alternatively you can take a look at {@link
|
|
328
|
-
* Renderer2}
|
|
329
|
-
* which provides API that can safely be used even when direct access to native elements is not
|
|
330
|
-
* supported.
|
|
331
|
-
* </p>
|
|
332
|
-
* <p>
|
|
333
|
-
* Relying on direct DOM access creates tight coupling between your application and rendering
|
|
334
|
-
* layers which will make it impossible to separate the two and deploy your application into a
|
|
335
|
-
* web worker.
|
|
336
|
-
* </p>
|
|
337
|
-
* </div>
|
|
338
|
-
*
|
|
339
|
-
*/
|
|
340
|
-
nativeElement: T;
|
|
341
|
-
constructor(nativeElement: T);
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
/**
|
|
345
|
-
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
346
|
-
*
|
|
347
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
348
|
-
*
|
|
349
|
-
* @usageNotes
|
|
350
|
-
*
|
|
351
|
-
* {@example core/di/ts/provider_spec.ts region='ExistingProvider'}
|
|
352
|
-
*
|
|
353
|
-
* ### Multi-value example
|
|
354
|
-
*
|
|
355
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
356
|
-
*
|
|
357
|
-
* @publicApi
|
|
358
|
-
*/
|
|
359
|
-
declare interface ExistingProvider extends ExistingSansProvider {
|
|
360
|
-
/**
|
|
361
|
-
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
362
|
-
*/
|
|
363
|
-
provide: any;
|
|
364
|
-
/**
|
|
365
|
-
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
366
|
-
* providers spread across many files to provide configuration information to a common token.
|
|
367
|
-
*/
|
|
368
|
-
multi?: boolean;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
/**
|
|
372
|
-
* Configures the `Injector` to return a value of another `useExisting` token.
|
|
373
|
-
*
|
|
374
|
-
* @see `ExistingProvider`
|
|
375
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
376
|
-
*
|
|
377
|
-
* @publicApi
|
|
378
|
-
*/
|
|
379
|
-
declare interface ExistingSansProvider {
|
|
380
|
-
/**
|
|
381
|
-
* Existing `token` to return. (Equivalent to `injector.get(useExisting)`)
|
|
382
|
-
*/
|
|
383
|
-
useExisting: any;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/**
|
|
387
|
-
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
388
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
389
|
-
*
|
|
390
|
-
* @usageNotes
|
|
391
|
-
*
|
|
392
|
-
* {@example core/di/ts/provider_spec.ts region='FactoryProvider'}
|
|
393
|
-
*
|
|
394
|
-
* Dependencies can also be marked as optional:
|
|
395
|
-
*
|
|
396
|
-
* {@example core/di/ts/provider_spec.ts region='FactoryProviderOptionalDeps'}
|
|
397
|
-
*
|
|
398
|
-
* ### Multi-value example
|
|
399
|
-
*
|
|
400
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
401
|
-
*
|
|
402
|
-
* @publicApi
|
|
403
|
-
*/
|
|
404
|
-
declare interface FactoryProvider extends FactorySansProvider {
|
|
405
|
-
/**
|
|
406
|
-
* An injection token. (Typically an instance of `Type` or `InjectionToken`, but can be `any`).
|
|
407
|
-
*/
|
|
408
|
-
provide: any;
|
|
409
|
-
/**
|
|
410
|
-
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
411
|
-
* providers spread across many files to provide configuration information to a common token.
|
|
412
|
-
*/
|
|
413
|
-
multi?: boolean;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
/**
|
|
417
|
-
* Configures the `Injector` to return a value by invoking a `useFactory` function.
|
|
418
|
-
*
|
|
419
|
-
* @see `FactoryProvider`
|
|
420
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
421
|
-
*
|
|
422
|
-
* @publicApi
|
|
423
|
-
*/
|
|
424
|
-
declare interface FactorySansProvider {
|
|
425
|
-
/**
|
|
426
|
-
* A function to invoke to create a value for this `token`. The function is invoked with
|
|
427
|
-
* resolved values of `token`s in the `deps` field.
|
|
428
|
-
*/
|
|
429
|
-
useFactory: Function;
|
|
430
|
-
/**
|
|
431
|
-
* A list of `token`s to be resolved by the injector. The list of values is then
|
|
432
|
-
* used as arguments to the `useFactory` function.
|
|
433
|
-
*/
|
|
434
|
-
deps?: any[];
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
/**
|
|
438
|
-
* Injection flags for DI.
|
|
439
|
-
*
|
|
440
|
-
* @publicApi
|
|
441
|
-
*/
|
|
442
|
-
declare enum InjectFlags {
|
|
443
|
-
/** Check self and check parent injector if needed */
|
|
444
|
-
Default = 0,
|
|
445
|
-
/**
|
|
446
|
-
* Specifies that an injector should retrieve a dependency from any injector until reaching the
|
|
447
|
-
* host element of the current component. (Only used with Element Injector)
|
|
448
|
-
*/
|
|
449
|
-
Host = 1,
|
|
450
|
-
/** Don't ascend to ancestors of the node requesting injection. */
|
|
451
|
-
Self = 2,
|
|
452
|
-
/** Skip the node that is requesting injection. */
|
|
453
|
-
SkipSelf = 4,
|
|
454
|
-
/** Inject `defaultValue` instead if token not found. */
|
|
455
|
-
Optional = 8
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
/**
|
|
459
|
-
* Creates a token that can be used in a DI Provider.
|
|
460
|
-
*
|
|
461
|
-
* Use an `InjectionToken` whenever the type you are injecting is not reified (does not have a
|
|
462
|
-
* runtime representation) such as when injecting an interface, callable type, array or
|
|
463
|
-
* parameterized type.
|
|
464
|
-
*
|
|
465
|
-
* `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
|
|
466
|
-
* the `Injector`. This provides additional level of type safety.
|
|
467
|
-
*
|
|
468
|
-
* ```
|
|
469
|
-
* interface MyInterface {...}
|
|
470
|
-
* var myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
|
|
471
|
-
* // myInterface is inferred to be MyInterface.
|
|
472
|
-
* ```
|
|
473
|
-
*
|
|
474
|
-
* When creating an `InjectionToken`, you can optionally specify a factory function which returns
|
|
475
|
-
* (possibly by creating) a default value of the parameterized type `T`. This sets up the
|
|
476
|
-
* `InjectionToken` using this factory as a provider as if it was defined explicitly in the
|
|
477
|
-
* application's root injector. If the factory function, which takes zero arguments, needs to inject
|
|
478
|
-
* dependencies, it can do so using the `inject` function. See below for an example.
|
|
479
|
-
*
|
|
480
|
-
* Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
|
|
481
|
-
* overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
|
|
482
|
-
* mentioned above, `'root'` is the default value for `providedIn`.
|
|
483
|
-
*
|
|
484
|
-
* @usageNotes
|
|
485
|
-
* ### Basic Example
|
|
486
|
-
*
|
|
487
|
-
* ### Plain InjectionToken
|
|
488
|
-
*
|
|
489
|
-
* {@example core/di/ts/injector_spec.ts region='InjectionToken'}
|
|
490
|
-
*
|
|
491
|
-
* ### Tree-shakable InjectionToken
|
|
492
|
-
*
|
|
493
|
-
* {@example core/di/ts/injector_spec.ts region='ShakableInjectionToken'}
|
|
494
|
-
*
|
|
495
|
-
*
|
|
496
|
-
* @publicApi
|
|
497
|
-
*/
|
|
498
|
-
declare class InjectionToken<T> {
|
|
499
|
-
protected _desc: string;
|
|
500
|
-
readonly ɵprov: unknown;
|
|
501
|
-
constructor(_desc: string, options?: {
|
|
502
|
-
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
503
|
-
factory: () => T;
|
|
504
|
-
});
|
|
505
|
-
toString(): string;
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
/**
|
|
509
|
-
* Concrete injectors implement this interface. Injectors are configured
|
|
510
|
-
* with [providers](guide/glossary#provider) that associate
|
|
511
|
-
* dependencies of various types with [injection tokens](guide/glossary#di-token).
|
|
512
|
-
*
|
|
513
|
-
* @see ["DI Providers"](guide/dependency-injection-providers).
|
|
514
|
-
* @see `StaticProvider`
|
|
515
|
-
*
|
|
516
|
-
* @usageNotes
|
|
517
|
-
*
|
|
518
|
-
* The following example creates a service injector instance.
|
|
519
|
-
*
|
|
520
|
-
* {@example core/di/ts/provider_spec.ts region='ConstructorProvider'}
|
|
521
|
-
*
|
|
522
|
-
* ### Usage example
|
|
523
|
-
*
|
|
524
|
-
* {@example core/di/ts/injector_spec.ts region='Injector'}
|
|
525
|
-
*
|
|
526
|
-
* `Injector` returns itself when given `Injector` as a token:
|
|
527
|
-
*
|
|
528
|
-
* {@example core/di/ts/injector_spec.ts region='injectInjector'}
|
|
529
|
-
*
|
|
530
|
-
* @publicApi
|
|
531
|
-
*/
|
|
532
|
-
declare abstract class Injector {
|
|
533
|
-
static THROW_IF_NOT_FOUND: {};
|
|
534
|
-
static NULL: Injector;
|
|
535
|
-
/**
|
|
536
|
-
* Retrieves an instance from the injector based on the provided token.
|
|
537
|
-
* @returns The instance from the injector if defined, otherwise the `notFoundValue`.
|
|
538
|
-
* @throws When the `notFoundValue` is `undefined` or `Injector.THROW_IF_NOT_FOUND`.
|
|
539
|
-
*/
|
|
540
|
-
abstract get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
|
|
541
|
-
/**
|
|
542
|
-
* @deprecated from v4.0.0 use ProviderToken<T>
|
|
543
|
-
* @suppress {duplicate}
|
|
544
|
-
*/
|
|
545
|
-
abstract get(token: any, notFoundValue?: any): any;
|
|
546
|
-
/**
|
|
547
|
-
* @deprecated from v5 use the new signature Injector.create(options)
|
|
548
|
-
*/
|
|
549
|
-
static create(providers: StaticProvider[], parent?: Injector): Injector;
|
|
550
|
-
/**
|
|
551
|
-
* Creates a new injector instance that provides one or more dependencies,
|
|
552
|
-
* according to a given type or types of `StaticProvider`.
|
|
553
|
-
*
|
|
554
|
-
* @param options An object with the following properties:
|
|
555
|
-
* * `providers`: An array of providers of the [StaticProvider type](api/core/StaticProvider).
|
|
556
|
-
* * `parent`: (optional) A parent injector.
|
|
557
|
-
* * `name`: (optional) A developer-defined identifying name for the new injector.
|
|
558
|
-
*
|
|
559
|
-
* @returns The new injector instance.
|
|
560
|
-
*
|
|
561
|
-
*/
|
|
562
|
-
static create(options: {
|
|
563
|
-
providers: StaticProvider[];
|
|
564
|
-
parent?: Injector;
|
|
565
|
-
name?: string;
|
|
566
|
-
}): Injector;
|
|
567
|
-
/** @nocollapse */
|
|
568
|
-
static ɵprov: unknown;
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
/**
|
|
572
|
-
* A type which has an `InjectorDef` static field.
|
|
573
|
-
*
|
|
574
|
-
* `InjectorTypes` can be used to configure a `StaticInjector`.
|
|
575
|
-
*
|
|
576
|
-
* This is an opaque type whose structure is highly version dependent. Do not rely on any
|
|
577
|
-
* properties.
|
|
578
|
-
*
|
|
579
|
-
* @publicApi
|
|
580
|
-
*/
|
|
581
|
-
declare interface InjectorType<T> extends Type<T> {
|
|
582
|
-
ɵfac?: unknown;
|
|
583
|
-
ɵinj: unknown;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
/**
|
|
587
|
-
* The existence of this constant (in this particular file) informs the Angular compiler that the
|
|
588
|
-
* current program is actually @angular/core, which needs to be compiled specially.
|
|
589
|
-
*/
|
|
590
|
-
export declare const ITS_JUST_ANGULAR = true;
|
|
591
|
-
|
|
592
|
-
/**
|
|
593
|
-
* Runtime link information for NgModules.
|
|
594
|
-
*
|
|
595
|
-
* This is the internal data structure used by the runtime to assemble components, directives,
|
|
596
|
-
* pipes, and injectors.
|
|
597
|
-
*
|
|
598
|
-
* NOTE: Always use `ɵɵdefineNgModule` function to create this object,
|
|
599
|
-
* never create the object directly since the shape of this object
|
|
600
|
-
* can change between versions.
|
|
601
|
-
*/
|
|
602
|
-
export declare interface NgModuleDef<T> {
|
|
603
|
-
/** Token representing the module. Used by DI. */
|
|
604
|
-
type: T;
|
|
605
|
-
/** List of components to bootstrap. */
|
|
606
|
-
bootstrap: Type<any>[] | (() => Type<any>[]);
|
|
607
|
-
/** List of components, directives, and pipes declared by this module. */
|
|
608
|
-
declarations: Type<any>[] | (() => Type<any>[]);
|
|
609
|
-
/** List of modules or `ModuleWithProviders` imported by this module. */
|
|
610
|
-
imports: Type<any>[] | (() => Type<any>[]);
|
|
611
|
-
/**
|
|
612
|
-
* List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
|
|
613
|
-
* module.
|
|
614
|
-
*/
|
|
615
|
-
exports: Type<any>[] | (() => Type<any>[]);
|
|
616
|
-
/**
|
|
617
|
-
* Cached value of computed `transitiveCompileScopes` for this module.
|
|
618
|
-
*
|
|
619
|
-
* This should never be read directly, but accessed via `transitiveScopesFor`.
|
|
620
|
-
*/
|
|
621
|
-
transitiveCompileScopes: NgModuleTransitiveScopes | null;
|
|
622
|
-
/** The set of schemas that declare elements to be allowed in the NgModule. */
|
|
623
|
-
schemas: SchemaMetadata[] | null;
|
|
624
|
-
/** Unique ID for the module with which it should be registered. */
|
|
625
|
-
id: string | null;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
export declare class NgModuleFactory<T> extends NgModuleFactory_2<T> {
|
|
629
|
-
moduleType: Type<T>;
|
|
630
|
-
constructor(moduleType: Type<T>);
|
|
631
|
-
create(parentInjector: Injector | null): NgModuleRef<T>;
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
/**
|
|
635
|
-
* @publicApi
|
|
636
|
-
*/
|
|
637
|
-
declare abstract class NgModuleFactory_2<T> {
|
|
638
|
-
abstract get moduleType(): Type<T>;
|
|
639
|
-
abstract create(parentInjector: Injector | null): NgModuleRef<T>;
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
/**
|
|
643
|
-
* Represents an instance of an `NgModule` created by an `NgModuleFactory`.
|
|
644
|
-
* Provides access to the `NgModule` instance and related objects.
|
|
645
|
-
*
|
|
646
|
-
* @publicApi
|
|
647
|
-
*/
|
|
648
|
-
declare abstract class NgModuleRef<T> {
|
|
649
|
-
/**
|
|
650
|
-
* The injector that contains all of the providers of the `NgModule`.
|
|
651
|
-
*/
|
|
652
|
-
abstract get injector(): Injector;
|
|
653
|
-
/**
|
|
654
|
-
* The resolver that can retrieve the component factories
|
|
655
|
-
* declared in the `entryComponents` property of the module.
|
|
656
|
-
*/
|
|
657
|
-
abstract get componentFactoryResolver(): ComponentFactoryResolver;
|
|
658
|
-
/**
|
|
659
|
-
* The `NgModule` instance.
|
|
660
|
-
*/
|
|
661
|
-
abstract get instance(): T;
|
|
662
|
-
/**
|
|
663
|
-
* Destroys the module instance and all of the data structures associated with it.
|
|
664
|
-
*/
|
|
665
|
-
abstract destroy(): void;
|
|
666
|
-
/**
|
|
667
|
-
* Registers a callback to be executed when the module is destroyed.
|
|
668
|
-
*/
|
|
669
|
-
abstract onDestroy(callback: () => void): void;
|
|
670
|
-
}
|
|
671
|
-
|
|
672
|
-
/**
|
|
673
|
-
* Represents the expansion of an `NgModule` into its scopes.
|
|
674
|
-
*
|
|
675
|
-
* A scope is a set of directives and pipes that are visible in a particular context. Each
|
|
676
|
-
* `NgModule` has two scopes. The `compilation` scope is the set of directives and pipes that will
|
|
677
|
-
* be recognized in the templates of components declared by the module. The `exported` scope is the
|
|
678
|
-
* set of directives and pipes exported by a module (that is, module B's exported scope gets added
|
|
679
|
-
* to module A's compilation scope when module A imports B).
|
|
680
|
-
*/
|
|
681
|
-
declare interface NgModuleTransitiveScopes {
|
|
682
|
-
compilation: {
|
|
683
|
-
directives: Set<any>;
|
|
684
|
-
pipes: Set<any>;
|
|
685
|
-
};
|
|
686
|
-
exported: {
|
|
687
|
-
directives: Set<any>;
|
|
688
|
-
pipes: Set<any>;
|
|
689
|
-
};
|
|
690
|
-
schemas: SchemaMetadata[] | null;
|
|
691
|
-
}
|
|
692
|
-
|
|
693
|
-
/**
|
|
694
|
-
* @description
|
|
695
|
-
*
|
|
696
|
-
* Token that can be used to retrieve an instance from an injector or through a query.
|
|
697
|
-
*
|
|
698
|
-
* @publicApi
|
|
699
|
-
*/
|
|
700
|
-
declare type ProviderToken<T> = Type<T> | AbstractType<T> | InjectionToken<T>;
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
/**
|
|
704
|
-
* A schema definition associated with an NgModule.
|
|
705
|
-
*
|
|
706
|
-
* @see `@NgModule`, `CUSTOM_ELEMENTS_SCHEMA`, `NO_ERRORS_SCHEMA`
|
|
707
|
-
*
|
|
708
|
-
* @param name The name of a defined schema.
|
|
709
|
-
*
|
|
710
|
-
* @publicApi
|
|
711
|
-
*/
|
|
712
|
-
declare interface SchemaMetadata {
|
|
713
|
-
name: string;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
/**
|
|
717
|
-
* Adds decorator, constructor, and property metadata to a given type via static metadata fields
|
|
718
|
-
* on the type.
|
|
719
|
-
*
|
|
720
|
-
* These metadata fields can later be read with Angular's `ReflectionCapabilities` API.
|
|
721
|
-
*
|
|
722
|
-
* Calls to `setClassMetadata` can be guarded by ngDevMode, resulting in the metadata assignments
|
|
723
|
-
* being tree-shaken away during production builds.
|
|
724
|
-
*/
|
|
725
|
-
export declare function setClassMetadata(type: Type<any>, decorators: any[] | null, ctorParameters: (() => any[]) | null, propDecorators: {
|
|
726
|
-
[field: string]: any;
|
|
727
|
-
} | null): void;
|
|
728
|
-
|
|
729
|
-
/**
|
|
730
|
-
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
731
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
732
|
-
*
|
|
733
|
-
* @usageNotes
|
|
734
|
-
*
|
|
735
|
-
* {@example core/di/ts/provider_spec.ts region='StaticClassProvider'}
|
|
736
|
-
*
|
|
737
|
-
* Note that following two providers are not equal:
|
|
738
|
-
*
|
|
739
|
-
* {@example core/di/ts/provider_spec.ts region='StaticClassProviderDifference'}
|
|
740
|
-
*
|
|
741
|
-
* ### Multi-value example
|
|
742
|
-
*
|
|
743
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
744
|
-
*
|
|
745
|
-
* @publicApi
|
|
746
|
-
*/
|
|
747
|
-
declare interface StaticClassProvider extends StaticClassSansProvider {
|
|
748
|
-
/**
|
|
749
|
-
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
750
|
-
*/
|
|
751
|
-
provide: any;
|
|
752
|
-
/**
|
|
753
|
-
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
754
|
-
* providers spread across many files to provide configuration information to a common token.
|
|
755
|
-
*/
|
|
756
|
-
multi?: boolean;
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
/**
|
|
760
|
-
* Configures the `Injector` to return an instance of `useClass` for a token.
|
|
761
|
-
* Base for `StaticClassProvider` decorator.
|
|
762
|
-
*
|
|
763
|
-
* @publicApi
|
|
764
|
-
*/
|
|
765
|
-
declare interface StaticClassSansProvider {
|
|
766
|
-
/**
|
|
767
|
-
* An optional class to instantiate for the `token`. By default, the `provide`
|
|
768
|
-
* class is instantiated.
|
|
769
|
-
*/
|
|
770
|
-
useClass: Type<any>;
|
|
771
|
-
/**
|
|
772
|
-
* A list of `token`s to be resolved by the injector. The list of values is then
|
|
773
|
-
* used as arguments to the `useClass` constructor.
|
|
774
|
-
*/
|
|
775
|
-
deps: any[];
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
/**
|
|
779
|
-
* Describes how an `Injector` should be configured as static (that is, without reflection).
|
|
780
|
-
* A static provider provides tokens to an injector for various types of dependencies.
|
|
781
|
-
*
|
|
782
|
-
* @see `Injector.create()`.
|
|
783
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection-providers).
|
|
784
|
-
*
|
|
785
|
-
* @publicApi
|
|
786
|
-
*/
|
|
787
|
-
declare type StaticProvider = ValueProvider | ExistingProvider | StaticClassProvider | ConstructorProvider | FactoryProvider | any[];
|
|
788
|
-
|
|
789
|
-
/**
|
|
790
|
-
* @description
|
|
791
|
-
*
|
|
792
|
-
* Represents a type that a Component or other object is instances of.
|
|
793
|
-
*
|
|
794
|
-
* An example of a `Type` is `MyCustomComponent` class, which in JavaScript is represented by
|
|
795
|
-
* the `MyCustomComponent` constructor function.
|
|
796
|
-
*
|
|
797
|
-
* @publicApi
|
|
798
|
-
*/
|
|
799
|
-
declare const Type: FunctionConstructor;
|
|
800
|
-
|
|
801
|
-
declare interface Type<T> extends Function {
|
|
802
|
-
new (...args: any[]): T;
|
|
803
|
-
}
|
|
804
|
-
|
|
805
|
-
/**
|
|
806
|
-
* Configures the `Injector` to return a value for a token.
|
|
807
|
-
* @see ["Dependency Injection Guide"](guide/dependency-injection).
|
|
808
|
-
*
|
|
809
|
-
* @usageNotes
|
|
810
|
-
*
|
|
811
|
-
* ### Example
|
|
812
|
-
*
|
|
813
|
-
* {@example core/di/ts/provider_spec.ts region='ValueProvider'}
|
|
814
|
-
*
|
|
815
|
-
* ### Multi-value example
|
|
816
|
-
*
|
|
817
|
-
* {@example core/di/ts/provider_spec.ts region='MultiProviderAspect'}
|
|
818
|
-
*
|
|
819
|
-
* @publicApi
|
|
820
|
-
*/
|
|
821
|
-
declare interface ValueProvider extends ValueSansProvider {
|
|
822
|
-
/**
|
|
823
|
-
* An injection token. Typically an instance of `Type` or `InjectionToken`, but can be `any`.
|
|
824
|
-
*/
|
|
825
|
-
provide: any;
|
|
826
|
-
/**
|
|
827
|
-
* When true, injector returns an array of instances. This is useful to allow multiple
|
|
828
|
-
* providers spread across many files to provide configuration information to a common token.
|
|
829
|
-
*/
|
|
830
|
-
multi?: boolean;
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
/**
|
|
834
|
-
* Configures the `Injector` to return a value for a token.
|
|
835
|
-
* Base for `ValueProvider` decorator.
|
|
836
|
-
*
|
|
837
|
-
* @publicApi
|
|
838
|
-
*/
|
|
839
|
-
declare interface ValueSansProvider {
|
|
840
|
-
/**
|
|
841
|
-
* The value to inject.
|
|
842
|
-
*/
|
|
843
|
-
useValue: any;
|
|
844
|
-
}
|
|
845
|
-
|
|
846
|
-
/**
|
|
847
|
-
* Represents an Angular [view](guide/glossary#view "Definition").
|
|
848
|
-
*
|
|
849
|
-
* @see {@link ChangeDetectorRef#usage-notes Change detection usage}
|
|
850
|
-
*
|
|
851
|
-
* @publicApi
|
|
852
|
-
*/
|
|
853
|
-
declare abstract class ViewRef extends ChangeDetectorRef {
|
|
854
|
-
/**
|
|
855
|
-
* Destroys this view and all of the data structures associated with it.
|
|
856
|
-
*/
|
|
857
|
-
abstract destroy(): void;
|
|
858
|
-
/**
|
|
859
|
-
* Reports whether this view has been destroyed.
|
|
860
|
-
* @returns True after the `destroy()` method has been called, false otherwise.
|
|
861
|
-
*/
|
|
862
|
-
abstract get destroyed(): boolean;
|
|
863
|
-
/**
|
|
864
|
-
* A lifecycle hook that provides additional developer-defined cleanup
|
|
865
|
-
* functionality for views.
|
|
866
|
-
* @param callback A handler function that cleans up developer-defined data
|
|
867
|
-
* associated with a view. Called when the `destroy()` method is invoked.
|
|
868
|
-
*/
|
|
869
|
-
abstract onDestroy(callback: Function): any /** TODO #9100 */;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
/**
|
|
874
|
-
* Convince closure compiler that the wrapped function has no side-effects.
|
|
875
|
-
*
|
|
876
|
-
* Closure compiler always assumes that `toString` has no side-effects. We use this quirk to
|
|
877
|
-
* allow us to execute a function but have closure compiler mark the call as no-side-effects.
|
|
878
|
-
* It is important that the return value for the `noSideEffects` function be assigned
|
|
879
|
-
* to something which is retained otherwise the call to `noSideEffects` will be removed by closure
|
|
880
|
-
* compiler.
|
|
881
|
-
*/
|
|
882
|
-
export declare function ɵnoSideEffects<T>(fn: () => T): T;
|
|
883
|
-
|
|
884
|
-
/**
|
|
885
|
-
* Construct an injectable definition which defines how a token will be constructed by the DI
|
|
886
|
-
* system, and in which injectors (if any) it will be available.
|
|
887
|
-
*
|
|
888
|
-
* This should be assigned to a static `ɵprov` field on a type, which will then be an
|
|
889
|
-
* `InjectableType`.
|
|
890
|
-
*
|
|
891
|
-
* Options:
|
|
892
|
-
* * `providedIn` determines which injectors will include the injectable, by either associating it
|
|
893
|
-
* with an `@NgModule` or other `InjectorType`, or by specifying that this injectable should be
|
|
894
|
-
* provided in the `'root'` injector, which will be the application-level injector in most apps.
|
|
895
|
-
* * `factory` gives the zero argument function which will create an instance of the injectable.
|
|
896
|
-
* The factory can call `inject` to access the `Injector` and request injection of dependencies.
|
|
897
|
-
*
|
|
898
|
-
* @codeGenApi
|
|
899
|
-
* @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
|
|
900
|
-
*/
|
|
901
|
-
export declare function ɵɵdefineInjectable<T>(opts: {
|
|
902
|
-
token: unknown;
|
|
903
|
-
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
904
|
-
factory: () => T;
|
|
905
|
-
}): unknown;
|
|
906
|
-
|
|
907
|
-
/**
|
|
908
|
-
* Construct an `InjectorDef` which configures an injector.
|
|
909
|
-
*
|
|
910
|
-
* This should be assigned to a static injector def (`ɵinj`) field on a type, which will then be an
|
|
911
|
-
* `InjectorType`.
|
|
912
|
-
*
|
|
913
|
-
* Options:
|
|
914
|
-
*
|
|
915
|
-
* * `providers`: an optional array of providers to add to the injector. Each provider must
|
|
916
|
-
* either have a factory or point to a type which has a `ɵprov` static property (the
|
|
917
|
-
* type must be an `InjectableType`).
|
|
918
|
-
* * `imports`: an optional array of imports of other `InjectorType`s or `InjectorTypeWithModule`s
|
|
919
|
-
* whose providers will also be added to the injector. Locally provided types will override
|
|
920
|
-
* providers from imports.
|
|
921
|
-
*
|
|
922
|
-
* @codeGenApi
|
|
923
|
-
*/
|
|
924
|
-
export declare function ɵɵdefineInjector(options: {
|
|
925
|
-
providers?: any[];
|
|
926
|
-
imports?: any[];
|
|
927
|
-
}): unknown;
|
|
928
|
-
|
|
929
|
-
/**
|
|
930
|
-
* @codeGenApi
|
|
931
|
-
*/
|
|
932
|
-
export declare function ɵɵdefineNgModule<T>(def: {
|
|
933
|
-
/** Token representing the module. Used by DI. */
|
|
934
|
-
type: T;
|
|
935
|
-
/** List of components to bootstrap. */
|
|
936
|
-
bootstrap?: Type<any>[] | (() => Type<any>[]);
|
|
937
|
-
/** List of components, directives, and pipes declared by this module. */
|
|
938
|
-
declarations?: Type<any>[] | (() => Type<any>[]);
|
|
939
|
-
/** List of modules or `ModuleWithProviders` imported by this module. */
|
|
940
|
-
imports?: Type<any>[] | (() => Type<any>[]);
|
|
941
|
-
/**
|
|
942
|
-
* List of modules, `ModuleWithProviders`, components, directives, or pipes exported by this
|
|
943
|
-
* module.
|
|
944
|
-
*/
|
|
945
|
-
exports?: Type<any>[] | (() => Type<any>[]);
|
|
946
|
-
/** The set of schemas that declare elements to be allowed in the NgModule. */
|
|
947
|
-
schemas?: SchemaMetadata[] | null;
|
|
948
|
-
/** Unique ID for the module that is used with `getModuleFactory`. */
|
|
949
|
-
id?: string | null;
|
|
950
|
-
}): unknown;
|
|
951
|
-
|
|
952
|
-
/**
|
|
953
|
-
* @publicApi
|
|
954
|
-
*/
|
|
955
|
-
export declare type ɵɵFactoryDeclaration<T, CtorDependencies extends CtorDependency[]> = unknown;
|
|
956
|
-
|
|
957
|
-
/**
|
|
958
|
-
* Generated instruction: Injects a token from the currently active injector.
|
|
959
|
-
*
|
|
960
|
-
* Must be used in the context of a factory function such as one defined for an
|
|
961
|
-
* `InjectionToken`. Throws an error if not called from such a context.
|
|
962
|
-
*
|
|
963
|
-
* (Additional documentation moved to `inject`, as it is the public API, and an alias for this
|
|
964
|
-
* instruction)
|
|
965
|
-
*
|
|
966
|
-
* @see inject
|
|
967
|
-
* @codeGenApi
|
|
968
|
-
* @publicApi This instruction has been emitted by ViewEngine for some time and is deployed to npm.
|
|
969
|
-
*/
|
|
970
|
-
export declare function ɵɵinject<T>(token: ProviderToken<T>): T;
|
|
971
|
-
|
|
972
|
-
export declare function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T | null;
|
|
973
|
-
|
|
974
|
-
/**
|
|
975
|
-
* Information about how a type or `InjectionToken` interfaces with the DI system.
|
|
976
|
-
*
|
|
977
|
-
* At a minimum, this includes a `factory` which defines how to create the given type `T`, possibly
|
|
978
|
-
* requesting injection of other types if necessary.
|
|
979
|
-
*
|
|
980
|
-
* Optionally, a `providedIn` parameter specifies that the given type belongs to a particular
|
|
981
|
-
* `Injector`, `NgModule`, or a special scope (e.g. `'root'`). A value of `null` indicates
|
|
982
|
-
* that the injectable does not belong to any scope.
|
|
983
|
-
*
|
|
984
|
-
* @codeGenApi
|
|
985
|
-
* @publicApi The ViewEngine compiler emits code with this type for injectables. This code is
|
|
986
|
-
* deployed to npm, and should be treated as public api.
|
|
987
|
-
|
|
988
|
-
*/
|
|
989
|
-
export declare interface ɵɵInjectableDeclaration<T> {
|
|
990
|
-
/**
|
|
991
|
-
* Specifies that the given type belongs to a particular injector:
|
|
992
|
-
* - `InjectorType` such as `NgModule`,
|
|
993
|
-
* - `'root'` the root injector
|
|
994
|
-
* - `'any'` all injectors.
|
|
995
|
-
* - `null`, does not belong to any injector. Must be explicitly listed in the injector
|
|
996
|
-
* `providers`.
|
|
997
|
-
*/
|
|
998
|
-
providedIn: InjectorType<any> | 'root' | 'platform' | 'any' | null;
|
|
999
|
-
/**
|
|
1000
|
-
* The token to which this definition belongs.
|
|
1001
|
-
*
|
|
1002
|
-
* Note that this may not be the same as the type that the `factory` will create.
|
|
1003
|
-
*/
|
|
1004
|
-
token: unknown;
|
|
1005
|
-
/**
|
|
1006
|
-
* Factory method to execute to create an instance of the injectable.
|
|
1007
|
-
*/
|
|
1008
|
-
factory: (t?: Type<any>) => T;
|
|
1009
|
-
/**
|
|
1010
|
-
* In a case of no explicit injector, a location where the instance of the injectable is stored.
|
|
1011
|
-
*/
|
|
1012
|
-
value: T | undefined;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* @publicApi
|
|
1017
|
-
*/
|
|
1018
|
-
export declare type ɵɵInjectorDeclaration<T> = unknown;
|
|
1019
|
-
|
|
1020
|
-
/**
|
|
1021
|
-
* @publicApi
|
|
1022
|
-
*/
|
|
1023
|
-
export declare type ɵɵNgModuleDeclaration<T, Declarations, Imports, Exports> = unknown;
|
|
1024
|
-
|
|
1025
|
-
export { }
|