@angular/core 7.2.0-beta.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/core-testing.umd.js +194 -128
- package/bundles/core-testing.umd.js.map +1 -1
- package/bundles/core-testing.umd.min.js +10 -10
- package/bundles/core-testing.umd.min.js.map +1 -1
- package/bundles/core.umd.js +5582 -4512
- package/bundles/core.umd.js.map +1 -1
- package/bundles/core.umd.min.js +122 -129
- package/bundles/core.umd.min.js.map +1 -1
- package/core.d.ts +12 -12
- package/core.metadata.json +1 -1
- package/esm2015/core.externs.js +45 -35
- package/esm2015/core.js +12 -13
- package/esm2015/index.js +3 -4
- package/esm2015/public_api.js +3 -5
- package/esm2015/src/application_init.js +22 -10
- package/esm2015/src/application_module.js +6 -5
- package/esm2015/src/application_ref.js +94 -37
- package/esm2015/src/application_tokens.js +21 -16
- package/esm2015/src/change_detection/change_detection.js +8 -7
- package/esm2015/src/change_detection/change_detection_util.js +2 -4
- package/esm2015/src/change_detection/change_detector_ref.js +2 -3
- package/esm2015/src/change_detection/constants.js +30 -32
- package/esm2015/src/change_detection/differs/default_iterable_differ.js +108 -29
- package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +53 -16
- package/esm2015/src/change_detection/differs/iterable_differs.js +100 -90
- package/esm2015/src/change_detection/differs/keyvalue_differs.js +85 -73
- package/esm2015/src/change_detection/pipe_transform.js +10 -5
- package/esm2015/src/change_detection.js +7 -3
- package/esm2015/src/codegen_private_exports.js +2 -3
- package/esm2015/src/console.js +3 -3
- package/esm2015/src/core.js +3 -4
- package/esm2015/src/core_private_export.js +2 -3
- package/esm2015/src/core_render3_private_export.js +13 -7
- package/esm2015/src/debug/debug_node.js +132 -90
- package/esm2015/src/di/defs.js +59 -50
- package/esm2015/src/di/forward_ref.js +5 -6
- package/esm2015/src/di/injectable.js +11 -11
- package/esm2015/src/di/injection_token.js +10 -6
- package/esm2015/src/di/injector.js +53 -43
- package/esm2015/src/di/injector_compatibility.js +13 -12
- package/esm2015/src/di/metadata.js +22 -13
- package/esm2015/src/di/provider.js +137 -120
- package/esm2015/src/di/r3_injector.js +127 -57
- package/esm2015/src/di/reflective_errors.js +19 -13
- package/esm2015/src/di/reflective_injector.js +20 -16
- package/esm2015/src/di/reflective_key.js +7 -5
- package/esm2015/src/di/reflective_provider.js +21 -20
- package/esm2015/src/di/scope.js +5 -5
- package/esm2015/src/di/util.js +13 -14
- package/esm2015/src/di.js +2 -3
- package/esm2015/src/error_handler.js +5 -4
- package/esm2015/src/errors.js +7 -8
- package/esm2015/src/event_emitter.js +3 -3
- package/esm2015/src/i18n/tokens.js +12 -10
- package/esm2015/src/is_dev_mode.js +2 -3
- package/esm2015/src/ivy_switch.js +2 -3
- package/esm2015/src/linker/compiler.js +9 -12
- package/esm2015/src/linker/component_factory.js +2 -3
- package/esm2015/src/linker/component_factory_resolver.js +24 -10
- package/esm2015/src/linker/element_ref.js +5 -3
- package/esm2015/src/linker/ng_module_factory.js +6 -5
- package/esm2015/src/linker/ng_module_factory_loader.js +63 -16
- package/esm2015/src/linker/query_list.js +16 -14
- package/esm2015/src/linker/system_js_ng_module_factory_loader.js +12 -5
- package/esm2015/src/linker/template_ref.js +2 -3
- package/esm2015/src/linker/view_container_ref.js +2 -3
- package/esm2015/src/linker/view_ref.js +13 -7
- package/esm2015/src/linker.js +3 -3
- package/esm2015/src/metadata/di.js +22 -15
- package/esm2015/src/metadata/directives.js +33 -19
- package/esm2015/src/metadata/lifecycle_hooks.js +81 -66
- package/esm2015/src/metadata/ng_module.js +82 -68
- package/esm2015/src/metadata/resource_loading.js +4 -3
- package/esm2015/src/metadata/view.js +25 -26
- package/esm2015/src/metadata.js +6 -3
- package/esm2015/src/platform_core_providers.js +5 -5
- package/esm2015/src/profile/profile.js +17 -13
- package/esm2015/src/profile/wtf_impl.js +36 -16
- package/esm2015/src/r3_symbols.js +18 -5
- package/esm2015/src/reflection/platform_reflection_capabilities.js +81 -40
- package/esm2015/src/reflection/reflection.js +5 -5
- package/esm2015/src/reflection/reflection_capabilities.js +38 -27
- package/esm2015/src/reflection/reflector.js +2 -3
- package/esm2015/src/reflection/types.js +2 -12
- package/esm2015/src/render/api.js +67 -47
- package/esm2015/src/render.js +3 -3
- package/esm2015/src/render3/assert.js +38 -3
- package/esm2015/src/render3/bindings.js +111 -0
- package/esm2015/src/render3/component.js +88 -77
- package/esm2015/src/render3/component_ref.js +86 -56
- package/esm2015/src/render3/context_discovery.js +94 -92
- package/esm2015/src/render3/definition.js +58 -51
- package/esm2015/src/render3/di.js +206 -166
- package/esm2015/src/render3/di_setup.js +51 -31
- package/esm2015/src/render3/discovery_utils.js +225 -39
- package/esm2015/src/render3/empty.js +28 -0
- package/esm2015/src/render3/errors.js +11 -15
- package/esm2015/src/render3/features/inherit_definition_feature.js +13 -10
- package/esm2015/src/render3/features/ng_onchanges_feature.js +15 -12
- package/esm2015/src/render3/features/providers_feature.js +2 -3
- package/esm2015/src/render3/fields.js +5 -5
- package/esm2015/src/render3/global_utils.js +22 -7
- package/esm2015/src/render3/global_utils_api.js +13 -7
- package/esm2015/src/render3/hooks.js +21 -26
- package/esm2015/src/render3/i18n.js +134 -115
- package/esm2015/src/render3/index.js +15 -7
- package/esm2015/src/render3/instructions.js +938 -813
- package/esm2015/src/render3/interfaces/container.js +37 -6
- package/esm2015/src/render3/interfaces/context.js +39 -37
- package/esm2015/src/render3/interfaces/definition.js +225 -265
- package/esm2015/src/render3/interfaces/i18n.js +179 -151
- package/esm2015/src/render3/interfaces/injector.js +95 -13
- package/esm2015/src/render3/interfaces/node.js +413 -382
- package/esm2015/src/render3/interfaces/player.js +78 -37
- package/esm2015/src/render3/interfaces/projection.js +5 -10
- package/esm2015/src/render3/interfaces/query.js +66 -60
- package/esm2015/src/render3/interfaces/renderer.js +292 -117
- package/esm2015/src/render3/interfaces/sanitization.js +2 -6
- package/esm2015/src/render3/interfaces/styling.js +322 -111
- package/esm2015/src/render3/interfaces/view.js +356 -298
- package/esm2015/src/render3/jit/compiler_facade.js +10 -4
- package/esm2015/src/render3/jit/compiler_facade_interface.js +195 -152
- package/esm2015/src/render3/jit/directive.js +26 -16
- package/esm2015/src/render3/jit/environment.js +8 -5
- package/esm2015/src/render3/jit/injectable.js +7 -10
- package/esm2015/src/render3/jit/module.js +309 -25
- package/esm2015/src/render3/jit/pipe.js +2 -3
- package/esm2015/src/render3/jit/util.js +2 -3
- package/esm2015/src/render3/metadata.js +11 -10
- package/esm2015/src/render3/ng_dev_mode.js +5 -6
- package/esm2015/src/render3/ng_module_ref.js +48 -22
- package/esm2015/src/render3/node_assert.js +2 -3
- package/esm2015/src/render3/node_manipulation.js +137 -117
- package/esm2015/src/render3/node_selector_matcher.js +46 -19
- package/esm2015/src/render3/pipe.js +36 -21
- package/esm2015/src/render3/players.js +17 -12
- package/esm2015/src/render3/pure_function.js +86 -39
- package/esm2015/src/render3/query.js +93 -80
- package/esm2015/src/render3/state.js +88 -203
- package/esm2015/src/render3/styling/class_and_style_bindings.js +963 -249
- package/esm2015/src/render3/styling/core_player_handler.js +6 -4
- package/esm2015/src/render3/styling/player_factory.js +3 -4
- package/esm2015/src/render3/styling/util.js +69 -31
- package/esm2015/src/render3/tokens.js +7 -6
- package/esm2015/src/render3/util.js +65 -55
- package/esm2015/src/render3/view_engine_compatibility.js +36 -59
- package/esm2015/src/render3/view_engine_compatibility_prebound.js +2 -3
- package/esm2015/src/render3/view_ref.js +58 -44
- package/esm2015/src/sanitization/bypass.js +29 -6
- package/esm2015/src/sanitization/html_sanitizer.js +48 -16
- package/esm2015/src/sanitization/inert_body.js +33 -18
- package/esm2015/src/sanitization/sanitization.js +35 -25
- package/esm2015/src/sanitization/security.js +3 -4
- package/esm2015/src/sanitization/style_sanitizer.js +10 -7
- package/esm2015/src/sanitization/url_sanitizer.js +9 -7
- package/esm2015/src/testability/testability.js +72 -42
- package/esm2015/src/type.js +6 -8
- package/esm2015/src/util/decorators.js +19 -14
- package/esm2015/src/util/lang.js +2 -3
- package/esm2015/src/util/ng_reflect.js +2 -3
- package/esm2015/src/util/noop.js +2 -3
- package/esm2015/src/util/property.js +3 -4
- package/esm2015/src/util.js +12 -4
- package/esm2015/src/version.js +6 -6
- package/esm2015/src/view/element.js +17 -17
- package/esm2015/src/view/entrypoint.js +15 -5
- package/esm2015/src/view/errors.js +4 -5
- package/esm2015/src/view/index.js +2 -3
- package/esm2015/src/view/ng_content.js +3 -4
- package/esm2015/src/view/ng_module.js +2 -3
- package/esm2015/src/view/provider.js +89 -24
- package/esm2015/src/view/pure_expression.js +14 -15
- package/esm2015/src/view/query.js +14 -14
- package/esm2015/src/view/refs.js +96 -38
- package/esm2015/src/view/services.js +64 -37
- package/esm2015/src/view/text.js +5 -6
- package/esm2015/src/view/types.js +390 -325
- package/esm2015/src/view/util.js +29 -24
- package/esm2015/src/view/view.js +43 -36
- package/esm2015/src/view/view_attach.js +9 -10
- package/esm2015/src/zone/ng_zone.js +29 -28
- package/esm2015/src/zone.js +3 -3
- package/esm2015/testing/index.js +2 -3
- package/esm2015/testing/public_api.js +4 -4
- package/esm2015/testing/src/async.js +2 -3
- package/esm2015/testing/src/async_fallback.js +8 -7
- package/esm2015/testing/src/async_test_completer.js +14 -6
- package/esm2015/testing/src/before_each.js +10 -4
- package/esm2015/testing/src/component_fixture.js +48 -17
- package/esm2015/testing/src/fake_async.js +9 -3
- package/esm2015/testing/src/fake_async_fallback.js +5 -5
- package/esm2015/testing/src/lang_utils.js +3 -4
- package/esm2015/testing/src/logger.js +2 -3
- package/esm2015/testing/src/metadata_override.js +2 -6
- package/esm2015/testing/src/metadata_overrider.js +9 -8
- package/esm2015/testing/src/ng_zone_mock.js +2 -3
- package/esm2015/testing/src/private_export_testing.js +2 -3
- package/esm2015/testing/src/r3_test_bed.js +324 -174
- package/esm2015/testing/src/resolvers.js +28 -11
- package/esm2015/testing/src/test_bed.js +123 -54
- package/esm2015/testing/src/test_bed_common.js +142 -85
- package/esm2015/testing/src/test_compiler.js +2 -3
- package/esm2015/testing/src/testing.js +3 -3
- package/esm2015/testing/src/testing_internal.js +17 -12
- package/esm2015/testing/testing.js +1 -2
- package/esm5/core.js +12 -13
- package/esm5/index.js +1 -2
- package/esm5/public_api.js +1 -2
- package/esm5/src/application_init.js +1 -2
- package/esm5/src/application_module.js +1 -2
- package/esm5/src/application_ref.js +1 -2
- package/esm5/src/application_tokens.js +1 -2
- package/esm5/src/change_detection/change_detection.js +1 -2
- package/esm5/src/change_detection/change_detection_util.js +1 -2
- package/esm5/src/change_detection/change_detector_ref.js +1 -2
- package/esm5/src/change_detection/constants.js +3 -4
- package/esm5/src/change_detection/differs/default_iterable_differ.js +1 -2
- package/esm5/src/change_detection/differs/default_keyvalue_differ.js +1 -2
- package/esm5/src/change_detection/differs/iterable_differs.js +1 -2
- package/esm5/src/change_detection/differs/keyvalue_differs.js +1 -2
- package/esm5/src/change_detection/pipe_transform.js +1 -2
- package/esm5/src/change_detection.js +1 -2
- package/esm5/src/codegen_private_exports.js +1 -2
- package/esm5/src/console.js +1 -2
- package/esm5/src/core.js +1 -2
- package/esm5/src/core_private_export.js +1 -2
- package/esm5/src/core_render3_private_export.js +7 -5
- package/esm5/src/debug/debug_node.js +79 -58
- package/esm5/src/di/defs.js +3 -4
- package/esm5/src/di/forward_ref.js +1 -2
- package/esm5/src/di/injectable.js +1 -2
- package/esm5/src/di/injection_token.js +1 -2
- package/esm5/src/di/injector.js +1 -2
- package/esm5/src/di/injector_compatibility.js +1 -2
- package/esm5/src/di/metadata.js +1 -2
- package/esm5/src/di/provider.js +1 -2
- package/esm5/src/di/r3_injector.js +48 -28
- package/esm5/src/di/reflective_errors.js +1 -2
- package/esm5/src/di/reflective_injector.js +1 -2
- package/esm5/src/di/reflective_key.js +1 -2
- package/esm5/src/di/reflective_provider.js +1 -2
- package/esm5/src/di/scope.js +1 -2
- package/esm5/src/di/util.js +1 -2
- package/esm5/src/di.js +1 -2
- package/esm5/src/error_handler.js +1 -2
- package/esm5/src/errors.js +1 -2
- package/esm5/src/event_emitter.js +1 -2
- package/esm5/src/i18n/tokens.js +1 -2
- package/esm5/src/is_dev_mode.js +1 -2
- package/esm5/src/ivy_switch.js +1 -2
- package/esm5/src/linker/compiler.js +1 -2
- package/esm5/src/linker/component_factory.js +1 -2
- package/esm5/src/linker/component_factory_resolver.js +1 -2
- package/esm5/src/linker/element_ref.js +1 -2
- package/esm5/src/linker/ng_module_factory.js +1 -2
- package/esm5/src/linker/ng_module_factory_loader.js +37 -13
- package/esm5/src/linker/query_list.js +1 -2
- package/esm5/src/linker/system_js_ng_module_factory_loader.js +1 -2
- package/esm5/src/linker/template_ref.js +1 -2
- package/esm5/src/linker/view_container_ref.js +1 -2
- package/esm5/src/linker/view_ref.js +1 -2
- package/esm5/src/linker.js +1 -2
- package/esm5/src/metadata/di.js +1 -2
- package/esm5/src/metadata/directives.js +1 -2
- package/esm5/src/metadata/lifecycle_hooks.js +1 -2
- package/esm5/src/metadata/ng_module.js +1 -2
- package/esm5/src/metadata/resource_loading.js +1 -2
- package/esm5/src/metadata/view.js +1 -2
- package/esm5/src/metadata.js +1 -2
- package/esm5/src/platform_core_providers.js +1 -2
- package/esm5/src/profile/profile.js +1 -2
- package/esm5/src/profile/wtf_impl.js +1 -2
- package/esm5/src/r3_symbols.js +1 -2
- package/esm5/src/reflection/platform_reflection_capabilities.js +1 -2
- package/esm5/src/reflection/reflection.js +1 -2
- package/esm5/src/reflection/reflection_capabilities.js +1 -2
- package/esm5/src/reflection/reflector.js +1 -2
- package/esm5/src/reflection/types.js +1 -2
- package/esm5/src/render/api.js +1 -2
- package/esm5/src/render.js +1 -2
- package/esm5/src/render3/assert.js +15 -2
- package/esm5/src/render3/bindings.js +63 -0
- package/esm5/src/render3/component.js +23 -16
- package/esm5/src/render3/component_ref.js +43 -36
- package/esm5/src/render3/context_discovery.js +68 -77
- package/esm5/src/render3/definition.js +30 -24
- package/esm5/src/render3/di.js +142 -135
- package/esm5/src/render3/di_setup.js +20 -21
- package/esm5/src/render3/discovery_utils.js +167 -36
- package/esm5/src/render3/empty.js +22 -0
- package/esm5/src/render3/errors.js +9 -12
- package/esm5/src/render3/features/inherit_definition_feature.js +3 -5
- package/esm5/src/render3/features/ng_onchanges_feature.js +11 -10
- package/esm5/src/render3/features/providers_feature.js +1 -2
- package/esm5/src/render3/fields.js +1 -2
- package/esm5/src/render3/global_utils.js +4 -3
- package/esm5/src/render3/global_utils_api.js +2 -3
- package/esm5/src/render3/hooks.js +14 -16
- package/esm5/src/render3/i18n.js +22 -27
- package/esm5/src/render3/index.js +5 -6
- package/esm5/src/render3/instructions.js +698 -593
- package/esm5/src/render3/interfaces/container.js +10 -3
- package/esm5/src/render3/interfaces/context.js +1 -2
- package/esm5/src/render3/interfaces/definition.js +1 -2
- package/esm5/src/render3/interfaces/i18n.js +1 -2
- package/esm5/src/render3/interfaces/injector.js +5 -6
- package/esm5/src/render3/interfaces/node.js +1 -2
- package/esm5/src/render3/interfaces/player.js +1 -2
- package/esm5/src/render3/interfaces/projection.js +1 -2
- package/esm5/src/render3/interfaces/query.js +1 -2
- package/esm5/src/render3/interfaces/renderer.js +1 -2
- package/esm5/src/render3/interfaces/sanitization.js +1 -2
- package/esm5/src/render3/interfaces/styling.js +1 -2
- package/esm5/src/render3/interfaces/view.js +3 -4
- package/esm5/src/render3/jit/compiler_facade.js +1 -2
- package/esm5/src/render3/jit/compiler_facade_interface.js +1 -2
- package/esm5/src/render3/jit/directive.js +19 -10
- package/esm5/src/render3/jit/environment.js +4 -2
- package/esm5/src/render3/jit/injectable.js +17 -18
- package/esm5/src/render3/jit/module.js +207 -13
- package/esm5/src/render3/jit/pipe.js +1 -2
- package/esm5/src/render3/jit/util.js +1 -2
- package/esm5/src/render3/metadata.js +1 -2
- package/esm5/src/render3/ng_dev_mode.js +1 -2
- package/esm5/src/render3/ng_module_ref.js +29 -11
- package/esm5/src/render3/node_assert.js +1 -2
- package/esm5/src/render3/node_manipulation.js +54 -50
- package/esm5/src/render3/node_selector_matcher.js +28 -9
- package/esm5/src/render3/pipe.js +33 -19
- package/esm5/src/render3/players.js +7 -9
- package/esm5/src/render3/pure_function.js +48 -38
- package/esm5/src/render3/query.js +8 -9
- package/esm5/src/render3/state.js +50 -135
- package/esm5/src/render3/styling/class_and_style_bindings.js +684 -214
- package/esm5/src/render3/styling/core_player_handler.js +1 -2
- package/esm5/src/render3/styling/player_factory.js +1 -2
- package/esm5/src/render3/styling/util.js +39 -22
- package/esm5/src/render3/tokens.js +1 -2
- package/esm5/src/render3/util.js +49 -37
- package/esm5/src/render3/view_engine_compatibility.js +20 -33
- package/esm5/src/render3/view_engine_compatibility_prebound.js +1 -2
- package/esm5/src/render3/view_ref.js +33 -30
- package/esm5/src/sanitization/bypass.js +1 -2
- package/esm5/src/sanitization/html_sanitizer.js +1 -2
- package/esm5/src/sanitization/inert_body.js +4 -5
- package/esm5/src/sanitization/sanitization.js +25 -20
- package/esm5/src/sanitization/security.js +1 -2
- package/esm5/src/sanitization/style_sanitizer.js +1 -2
- package/esm5/src/sanitization/url_sanitizer.js +1 -2
- package/esm5/src/testability/testability.js +1 -2
- package/esm5/src/type.js +1 -2
- package/esm5/src/util/decorators.js +1 -2
- package/esm5/src/util/lang.js +1 -2
- package/esm5/src/util/ng_reflect.js +1 -2
- package/esm5/src/util/noop.js +1 -2
- package/esm5/src/util/property.js +1 -2
- package/esm5/src/util.js +1 -2
- package/esm5/src/version.js +2 -3
- package/esm5/src/view/element.js +1 -2
- package/esm5/src/view/entrypoint.js +1 -2
- package/esm5/src/view/errors.js +1 -2
- package/esm5/src/view/index.js +1 -2
- package/esm5/src/view/ng_content.js +1 -2
- package/esm5/src/view/ng_module.js +1 -2
- package/esm5/src/view/provider.js +1 -2
- package/esm5/src/view/pure_expression.js +1 -2
- package/esm5/src/view/query.js +1 -2
- package/esm5/src/view/refs.js +1 -2
- package/esm5/src/view/services.js +1 -2
- package/esm5/src/view/text.js +1 -2
- package/esm5/src/view/types.js +1 -2
- package/esm5/src/view/util.js +1 -2
- package/esm5/src/view/view.js +1 -2
- package/esm5/src/view/view_attach.js +1 -2
- package/esm5/src/zone/ng_zone.js +1 -2
- package/esm5/src/zone.js +1 -2
- package/esm5/testing/index.js +1 -2
- package/esm5/testing/public_api.js +1 -2
- package/esm5/testing/src/async.js +1 -2
- package/esm5/testing/src/async_fallback.js +1 -2
- package/esm5/testing/src/async_test_completer.js +1 -2
- package/esm5/testing/src/before_each.js +1 -2
- package/esm5/testing/src/component_fixture.js +1 -2
- package/esm5/testing/src/fake_async.js +1 -2
- package/esm5/testing/src/fake_async_fallback.js +1 -2
- package/esm5/testing/src/lang_utils.js +1 -2
- package/esm5/testing/src/logger.js +1 -2
- package/esm5/testing/src/metadata_override.js +1 -2
- package/esm5/testing/src/metadata_overrider.js +1 -2
- package/esm5/testing/src/ng_zone_mock.js +1 -2
- package/esm5/testing/src/private_export_testing.js +1 -2
- package/esm5/testing/src/r3_test_bed.js +182 -121
- package/esm5/testing/src/resolvers.js +11 -7
- package/esm5/testing/src/test_bed.js +1 -2
- package/esm5/testing/src/test_bed_common.js +1 -2
- package/esm5/testing/src/test_compiler.js +1 -2
- package/esm5/testing/src/testing.js +1 -2
- package/esm5/testing/src/testing_internal.js +2 -3
- package/esm5/testing/testing.js +1 -2
- package/fesm2015/core.js +8560 -6153
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +351 -229
- package/fesm2015/testing.js.map +1 -1
- package/fesm5/core.js +5541 -4482
- package/fesm5/core.js.map +1 -1
- package/fesm5/testing.js +185 -130
- package/fesm5/testing.js.map +1 -1
- package/package.json +1 -1
- package/src/change_detection/constants.d.ts +2 -2
- package/src/core_render3_private_export.d.ts +6 -3
- package/src/di/injectable.d.ts +3 -2
- package/src/di/r3_injector.d.ts +1 -1
- package/src/linker/ng_module_factory_loader.d.ts +5 -1
- package/src/render3/assert.d.ts +6 -0
- package/src/render3/bindings.d.ts +20 -0
- package/src/render3/component.d.ts +3 -3
- package/src/render3/component_ref.d.ts +14 -4
- package/src/render3/context_discovery.d.ts +9 -9
- package/src/render3/definition.d.ts +8 -23
- package/src/render3/di.d.ts +19 -17
- package/src/render3/discovery_utils.d.ts +66 -8
- package/src/render3/empty.d.ts +16 -0
- package/src/render3/errors.d.ts +1 -1
- package/src/render3/global_utils_api.d.ts +1 -1
- package/src/render3/hooks.d.ts +7 -6
- package/src/render3/index.d.ts +4 -4
- package/src/render3/instructions.d.ts +163 -118
- package/src/render3/interfaces/container.d.ts +9 -8
- package/src/render3/interfaces/context.d.ts +3 -3
- package/src/render3/interfaces/definition.d.ts +2 -12
- package/src/render3/interfaces/i18n.d.ts +25 -25
- package/src/render3/interfaces/injector.d.ts +8 -9
- package/src/render3/interfaces/node.d.ts +56 -23
- package/src/render3/interfaces/renderer.d.ts +2 -1
- package/src/render3/interfaces/styling.d.ts +392 -117
- package/src/render3/interfaces/view.d.ts +49 -35
- package/src/render3/jit/compiler_facade_interface.d.ts +10 -3
- package/src/render3/jit/module.d.ts +9 -1
- package/src/render3/metadata.d.ts +1 -1
- package/src/render3/ng_module_ref.d.ts +8 -6
- package/src/render3/node_manipulation.d.ts +21 -27
- package/src/render3/node_selector_matcher.d.ts +2 -2
- package/src/render3/state.d.ts +11 -38
- package/src/render3/styling/class_and_style_bindings.d.ts +130 -43
- package/src/render3/styling/util.d.ts +9 -4
- package/src/render3/util.d.ts +31 -25
- package/src/render3/view_engine_compatibility.d.ts +5 -12
- package/src/render3/view_engine_compatibility_prebound.d.ts +2 -2
- package/src/render3/view_ref.d.ts +2 -2
- package/src/sanitization/sanitization.d.ts +3 -2
- package/testing/src/r3_test_bed.d.ts +15 -0
- package/testing/src/resolvers.d.ts +2 -2
- package/testing/testing.metadata.json +1 -1
- package/testing.d.ts +5 -0
package/fesm2015/testing.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v7.2.0
|
|
2
|
+
* @license Angular v7.2.0
|
|
3
3
|
* (c) 2010-2018 Google, Inc. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
import { RendererFactory2, getDebugNode, ɵstringify, Component, Directive, NgModule, Pipe, ɵReflectionCapabilities, InjectionToken, Injector, NgZone, ɵRender3ComponentFactory, ɵRender3NgModuleRef, ɵcompileComponent, ɵcompileDirective, ɵcompileNgModuleDefs, ɵcompilePipe, ɵgetInjectableDef, ɵpatchComponentDefWithScope, Compiler, Injectable,
|
|
7
|
+
import { RendererFactory2, getDebugNode, ɵstringify, Component, Directive, NgModule, Pipe, ɵReflectionCapabilities, InjectionToken, ApplicationInitStatus, Injector, NgZone, resolveForwardRef, ɵRender3ComponentFactory, ɵRender3NgModuleRef, ɵcompileComponent, ɵcompileDirective, ɵcompileNgModuleDefs, ɵcompilePipe, ɵgetInjectableDef, ɵpatchComponentDefWithScope, ɵresetCompiledComponents, Compiler, Injectable, Optional, SkipSelf, ɵAPP_ROOT, ɵclearOverrides, ɵivyEnabled, ɵoverrideComponentView, ɵoverrideProvider } from '@angular/core';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @fileoverview added by tsickle
|
|
11
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
11
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
12
12
|
*/
|
|
13
13
|
/**
|
|
14
14
|
* @license
|
|
@@ -18,7 +18,7 @@ import { RendererFactory2, getDebugNode, ɵstringify, Component, Directive, NgMo
|
|
|
18
18
|
* found in the LICENSE file at https://angular.io/license
|
|
19
19
|
*/
|
|
20
20
|
/** @type {?} */
|
|
21
|
-
const _global = /** @type {?} */ ((typeof window === 'undefined' ? global : window));
|
|
21
|
+
const _global = (/** @type {?} */ ((typeof window === 'undefined' ? global : window)));
|
|
22
22
|
/**
|
|
23
23
|
* Wraps a test function in an asynchronous test zone. The test will automatically
|
|
24
24
|
* complete when all asynchronous calls within this zone are done. Can be used
|
|
@@ -52,7 +52,7 @@ function asyncFallback(fn) {
|
|
|
52
52
|
}
|
|
53
53
|
runInTestZone(fn, this, done, (err) => {
|
|
54
54
|
if (typeof err === 'string') {
|
|
55
|
-
return done.fail(new Error(/** @type {?} */ (err)));
|
|
55
|
+
return done.fail(new Error((/** @type {?} */ (err))));
|
|
56
56
|
}
|
|
57
57
|
else {
|
|
58
58
|
done.fail(err);
|
|
@@ -81,13 +81,13 @@ function runInTestZone(fn, context, finishCallback, failCallback) {
|
|
|
81
81
|
/** @type {?} */
|
|
82
82
|
const currentZone = Zone.current;
|
|
83
83
|
/** @type {?} */
|
|
84
|
-
const AsyncTestZoneSpec = (/** @type {?} */ (Zone))['AsyncTestZoneSpec'];
|
|
84
|
+
const AsyncTestZoneSpec = ((/** @type {?} */ (Zone)))['AsyncTestZoneSpec'];
|
|
85
85
|
if (AsyncTestZoneSpec === undefined) {
|
|
86
86
|
throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
|
|
87
87
|
'Please make sure that your environment includes zone.js/dist/async-test.js');
|
|
88
88
|
}
|
|
89
89
|
/** @type {?} */
|
|
90
|
-
const ProxyZoneSpec = /** @type {?} */ ((/** @type {?} */ (Zone))['ProxyZoneSpec']);
|
|
90
|
+
const ProxyZoneSpec = (/** @type {?} */ (((/** @type {?} */ (Zone)))['ProxyZoneSpec']));
|
|
91
91
|
if (ProxyZoneSpec === undefined) {
|
|
92
92
|
throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
|
|
93
93
|
'Please make sure that your environment includes zone.js/dist/proxy.js');
|
|
@@ -95,6 +95,8 @@ function runInTestZone(fn, context, finishCallback, failCallback) {
|
|
|
95
95
|
/** @type {?} */
|
|
96
96
|
const proxyZoneSpec = ProxyZoneSpec.get();
|
|
97
97
|
ProxyZoneSpec.assertPresent();
|
|
98
|
+
// We need to create the AsyncTestZoneSpec outside the ProxyZone.
|
|
99
|
+
// If we do it in ProxyZone then we will get to infinite recursion.
|
|
98
100
|
/** @type {?} */
|
|
99
101
|
const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
|
|
100
102
|
/** @type {?} */
|
|
@@ -127,7 +129,7 @@ function runInTestZone(fn, context, finishCallback, failCallback) {
|
|
|
127
129
|
|
|
128
130
|
/**
|
|
129
131
|
* @fileoverview added by tsickle
|
|
130
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
132
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
131
133
|
*/
|
|
132
134
|
/**
|
|
133
135
|
* Wraps a test function in an asynchronous test zone. The test will automatically
|
|
@@ -170,7 +172,7 @@ function async(fn) {
|
|
|
170
172
|
|
|
171
173
|
/**
|
|
172
174
|
* @fileoverview added by tsickle
|
|
173
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
175
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
174
176
|
*/
|
|
175
177
|
/**
|
|
176
178
|
* Fixture for debugging and testing a component.
|
|
@@ -198,7 +200,7 @@ class ComponentFixture {
|
|
|
198
200
|
this._onErrorSubscription = null;
|
|
199
201
|
this.changeDetectorRef = componentRef.changeDetectorRef;
|
|
200
202
|
this.elementRef = componentRef.location;
|
|
201
|
-
this.debugElement = /** @type {?} */ (getDebugNode(this.elementRef.nativeElement));
|
|
203
|
+
this.debugElement = (/** @type {?} */ (getDebugNode(this.elementRef.nativeElement)));
|
|
202
204
|
this.componentInstance = componentRef.instance;
|
|
203
205
|
this.nativeElement = this.elementRef.nativeElement;
|
|
204
206
|
this.componentRef = componentRef;
|
|
@@ -229,7 +231,7 @@ class ComponentFixture {
|
|
|
229
231
|
scheduleMicroTask(() => {
|
|
230
232
|
if (!ngZone.hasPendingMacrotasks) {
|
|
231
233
|
if (this._promise !== null) {
|
|
232
|
-
/** @type {?} */ (
|
|
234
|
+
(/** @type {?} */ (this._resolve))(true);
|
|
233
235
|
this._resolve = null;
|
|
234
236
|
this._promise = null;
|
|
235
237
|
}
|
|
@@ -244,6 +246,7 @@ class ComponentFixture {
|
|
|
244
246
|
}
|
|
245
247
|
}
|
|
246
248
|
/**
|
|
249
|
+
* @private
|
|
247
250
|
* @param {?} checkNoChanges
|
|
248
251
|
* @return {?}
|
|
249
252
|
*/
|
|
@@ -293,7 +296,7 @@ class ComponentFixture {
|
|
|
293
296
|
* yet.
|
|
294
297
|
* @return {?}
|
|
295
298
|
*/
|
|
296
|
-
isStable() { return this._isStable &&
|
|
299
|
+
isStable() { return this._isStable && !(/** @type {?} */ (this.ngZone)).hasPendingMacrotasks; }
|
|
297
300
|
/**
|
|
298
301
|
* Get a promise that resolves when the fixture is stable.
|
|
299
302
|
*
|
|
@@ -314,13 +317,14 @@ class ComponentFixture {
|
|
|
314
317
|
}
|
|
315
318
|
}
|
|
316
319
|
/**
|
|
320
|
+
* @private
|
|
317
321
|
* @return {?}
|
|
318
322
|
*/
|
|
319
323
|
_getRenderer() {
|
|
320
324
|
if (this._renderer === undefined) {
|
|
321
325
|
this._renderer = this.componentRef.injector.get(RendererFactory2, null);
|
|
322
326
|
}
|
|
323
|
-
return /** @type {?} */ (this._renderer);
|
|
327
|
+
return (/** @type {?} */ (this._renderer));
|
|
324
328
|
}
|
|
325
329
|
/**
|
|
326
330
|
* Get a promise that resolves when the ui state is stable following animations.
|
|
@@ -371,7 +375,7 @@ function scheduleMicroTask(fn) {
|
|
|
371
375
|
|
|
372
376
|
/**
|
|
373
377
|
* @fileoverview added by tsickle
|
|
374
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
378
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
375
379
|
*/
|
|
376
380
|
/**
|
|
377
381
|
* @license
|
|
@@ -380,10 +384,11 @@ function scheduleMicroTask(fn) {
|
|
|
380
384
|
* Use of this source code is governed by an MIT-style license that can be
|
|
381
385
|
* found in the LICENSE file at https://angular.io/license
|
|
382
386
|
*/
|
|
383
|
-
/**
|
|
387
|
+
/**
|
|
384
388
|
* fakeAsync has been moved to zone.js
|
|
385
389
|
* this file is for fallback in case old version of zone.js is used
|
|
386
|
-
|
|
390
|
+
* @type {?}
|
|
391
|
+
*/
|
|
387
392
|
const _Zone = typeof Zone !== 'undefined' ? Zone : null;
|
|
388
393
|
/** @type {?} */
|
|
389
394
|
const FakeAsyncTestZoneSpec = _Zone && _Zone['FakeAsyncTestZoneSpec'];
|
|
@@ -530,7 +535,7 @@ function flushMicrotasksFallback() {
|
|
|
530
535
|
|
|
531
536
|
/**
|
|
532
537
|
* @fileoverview added by tsickle
|
|
533
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
538
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
534
539
|
*/
|
|
535
540
|
/** @type {?} */
|
|
536
541
|
const _Zone$1 = typeof Zone !== 'undefined' ? Zone : null;
|
|
@@ -650,7 +655,7 @@ function flushMicrotasks() {
|
|
|
650
655
|
|
|
651
656
|
/**
|
|
652
657
|
* @fileoverview added by tsickle
|
|
653
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
658
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
654
659
|
*/
|
|
655
660
|
/**
|
|
656
661
|
* @license
|
|
@@ -688,7 +693,7 @@ class AsyncTestCompleter {
|
|
|
688
693
|
|
|
689
694
|
/**
|
|
690
695
|
* @fileoverview added by tsickle
|
|
691
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
696
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
692
697
|
*/
|
|
693
698
|
/** @type {?} */
|
|
694
699
|
let _nextReferenceId = 0;
|
|
@@ -709,7 +714,7 @@ class MetadataOverrider {
|
|
|
709
714
|
/** @type {?} */
|
|
710
715
|
const props = {};
|
|
711
716
|
if (oldMetadata) {
|
|
712
|
-
_valueProps(oldMetadata).forEach((prop) => props[prop] = (/** @type {?} */ (oldMetadata))[prop]);
|
|
717
|
+
_valueProps(oldMetadata).forEach((prop) => props[prop] = ((/** @type {?} */ (oldMetadata)))[prop]);
|
|
713
718
|
}
|
|
714
719
|
if (override.set) {
|
|
715
720
|
if (override.remove || override.add) {
|
|
@@ -723,7 +728,7 @@ class MetadataOverrider {
|
|
|
723
728
|
if (override.add) {
|
|
724
729
|
addMetadata(props, override.add);
|
|
725
730
|
}
|
|
726
|
-
return new metadataClass(/** @type {?} */ (props));
|
|
731
|
+
return new metadataClass((/** @type {?} */ (props)));
|
|
727
732
|
}
|
|
728
733
|
}
|
|
729
734
|
/**
|
|
@@ -830,6 +835,7 @@ function _valueProps(obj) {
|
|
|
830
835
|
props.push(prop);
|
|
831
836
|
}
|
|
832
837
|
});
|
|
838
|
+
// getters
|
|
833
839
|
/** @type {?} */
|
|
834
840
|
let proto = obj;
|
|
835
841
|
while (proto = Object.getPrototypeOf(proto)) {
|
|
@@ -846,7 +852,7 @@ function _valueProps(obj) {
|
|
|
846
852
|
|
|
847
853
|
/**
|
|
848
854
|
* @fileoverview added by tsickle
|
|
849
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
855
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
850
856
|
*/
|
|
851
857
|
/** @type {?} */
|
|
852
858
|
const reflection = new ɵReflectionCapabilities();
|
|
@@ -866,7 +872,12 @@ class OverrideResolver {
|
|
|
866
872
|
*/
|
|
867
873
|
setOverrides(overrides) {
|
|
868
874
|
this.overrides.clear();
|
|
869
|
-
overrides.forEach(([type, override]) =>
|
|
875
|
+
overrides.forEach(([type, override]) => {
|
|
876
|
+
/** @type {?} */
|
|
877
|
+
const overrides = this.overrides.get(type) || [];
|
|
878
|
+
overrides.push(override);
|
|
879
|
+
this.overrides.set(type, overrides);
|
|
880
|
+
});
|
|
870
881
|
}
|
|
871
882
|
/**
|
|
872
883
|
* @param {?} type
|
|
@@ -886,11 +897,13 @@ class OverrideResolver {
|
|
|
886
897
|
resolved = this.getAnnotation(type);
|
|
887
898
|
if (resolved) {
|
|
888
899
|
/** @type {?} */
|
|
889
|
-
const
|
|
890
|
-
if (
|
|
900
|
+
const overrides = this.overrides.get(type);
|
|
901
|
+
if (overrides) {
|
|
891
902
|
/** @type {?} */
|
|
892
903
|
const overrider = new MetadataOverrider();
|
|
893
|
-
|
|
904
|
+
overrides.forEach(override => {
|
|
905
|
+
resolved = overrider.overrideMetadata(this.type, (/** @type {?} */ (resolved)), override);
|
|
906
|
+
});
|
|
894
907
|
}
|
|
895
908
|
}
|
|
896
909
|
this.resolved.set(type, resolved);
|
|
@@ -925,7 +938,7 @@ class NgModuleResolver extends OverrideResolver {
|
|
|
925
938
|
|
|
926
939
|
/**
|
|
927
940
|
* @fileoverview added by tsickle
|
|
928
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
941
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
929
942
|
*/
|
|
930
943
|
/**
|
|
931
944
|
* An abstract class for inserting the root test component element in a platform independent way.
|
|
@@ -939,21 +952,25 @@ class TestComponentRenderer {
|
|
|
939
952
|
*/
|
|
940
953
|
insertRootElement(rootElementId) { }
|
|
941
954
|
}
|
|
942
|
-
/**
|
|
955
|
+
/**
|
|
943
956
|
* \@publicApi
|
|
944
|
-
|
|
957
|
+
* @type {?}
|
|
958
|
+
*/
|
|
945
959
|
const ComponentFixtureAutoDetect = new InjectionToken('ComponentFixtureAutoDetect');
|
|
946
|
-
/**
|
|
960
|
+
/**
|
|
947
961
|
* \@publicApi
|
|
948
|
-
|
|
962
|
+
* @type {?}
|
|
963
|
+
*/
|
|
949
964
|
const ComponentFixtureNoNgZone = new InjectionToken('ComponentFixtureNoNgZone');
|
|
950
965
|
|
|
951
966
|
/**
|
|
952
967
|
* @fileoverview added by tsickle
|
|
953
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
968
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
954
969
|
*/
|
|
955
970
|
/** @type {?} */
|
|
956
971
|
let _nextRootElementId = 0;
|
|
972
|
+
/** @type {?} */
|
|
973
|
+
const EMPTY_ARRAY = [];
|
|
957
974
|
/**
|
|
958
975
|
* \@description
|
|
959
976
|
* Configures and initializes environment for unit testing and provides methods for
|
|
@@ -967,20 +984,25 @@ let _nextRootElementId = 0;
|
|
|
967
984
|
class TestBedRender3 {
|
|
968
985
|
constructor() {
|
|
969
986
|
// Properties
|
|
970
|
-
this.platform = /** @type {?} */ (
|
|
971
|
-
this.ngModule = /** @type {?} */ (
|
|
987
|
+
this.platform = (/** @type {?} */ (null));
|
|
988
|
+
this.ngModule = (/** @type {?} */ (null));
|
|
989
|
+
// metadata overrides
|
|
972
990
|
this._moduleOverrides = [];
|
|
973
991
|
this._componentOverrides = [];
|
|
974
992
|
this._directiveOverrides = [];
|
|
975
993
|
this._pipeOverrides = [];
|
|
976
994
|
this._providerOverrides = [];
|
|
977
995
|
this._rootProviderOverrides = [];
|
|
996
|
+
this._providerOverridesByToken = new Map();
|
|
997
|
+
this._templateOverrides = new Map();
|
|
998
|
+
// test module configuration
|
|
978
999
|
this._providers = [];
|
|
979
1000
|
this._declarations = [];
|
|
980
1001
|
this._imports = [];
|
|
981
1002
|
this._schemas = [];
|
|
982
1003
|
this._activeFixtures = [];
|
|
983
|
-
this._moduleRef = /** @type {?} */ (
|
|
1004
|
+
this._moduleRef = (/** @type {?} */ (null));
|
|
1005
|
+
this._testModuleType = (/** @type {?} */ (null));
|
|
984
1006
|
this._instantiated = false;
|
|
985
1007
|
}
|
|
986
1008
|
/**
|
|
@@ -1019,7 +1041,7 @@ class TestBedRender3 {
|
|
|
1019
1041
|
*/
|
|
1020
1042
|
static configureCompiler(config) {
|
|
1021
1043
|
_getTestBedRender3().configureCompiler(config);
|
|
1022
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1044
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1023
1045
|
}
|
|
1024
1046
|
/**
|
|
1025
1047
|
* Allows overriding default providers, directives, pipes, modules of the test injector,
|
|
@@ -1029,7 +1051,7 @@ class TestBedRender3 {
|
|
|
1029
1051
|
*/
|
|
1030
1052
|
static configureTestingModule(moduleDef) {
|
|
1031
1053
|
_getTestBedRender3().configureTestingModule(moduleDef);
|
|
1032
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1054
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1033
1055
|
}
|
|
1034
1056
|
/**
|
|
1035
1057
|
* Compile components with a `templateUrl` for the test's NgModule.
|
|
@@ -1045,7 +1067,7 @@ class TestBedRender3 {
|
|
|
1045
1067
|
*/
|
|
1046
1068
|
static overrideModule(ngModule, override) {
|
|
1047
1069
|
_getTestBedRender3().overrideModule(ngModule, override);
|
|
1048
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1070
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1049
1071
|
}
|
|
1050
1072
|
/**
|
|
1051
1073
|
* @param {?} component
|
|
@@ -1054,7 +1076,7 @@ class TestBedRender3 {
|
|
|
1054
1076
|
*/
|
|
1055
1077
|
static overrideComponent(component, override) {
|
|
1056
1078
|
_getTestBedRender3().overrideComponent(component, override);
|
|
1057
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1079
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1058
1080
|
}
|
|
1059
1081
|
/**
|
|
1060
1082
|
* @param {?} directive
|
|
@@ -1063,7 +1085,7 @@ class TestBedRender3 {
|
|
|
1063
1085
|
*/
|
|
1064
1086
|
static overrideDirective(directive, override) {
|
|
1065
1087
|
_getTestBedRender3().overrideDirective(directive, override);
|
|
1066
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1088
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1067
1089
|
}
|
|
1068
1090
|
/**
|
|
1069
1091
|
* @param {?} pipe
|
|
@@ -1072,7 +1094,7 @@ class TestBedRender3 {
|
|
|
1072
1094
|
*/
|
|
1073
1095
|
static overridePipe(pipe, override) {
|
|
1074
1096
|
_getTestBedRender3().overridePipe(pipe, override);
|
|
1075
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1097
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1076
1098
|
}
|
|
1077
1099
|
/**
|
|
1078
1100
|
* @param {?} component
|
|
@@ -1080,8 +1102,8 @@ class TestBedRender3 {
|
|
|
1080
1102
|
* @return {?}
|
|
1081
1103
|
*/
|
|
1082
1104
|
static overrideTemplate(component, template) {
|
|
1083
|
-
_getTestBedRender3().overrideComponent(component, { set: { template, templateUrl: /** @type {?} */ (
|
|
1084
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1105
|
+
_getTestBedRender3().overrideComponent(component, { set: { template, templateUrl: (/** @type {?} */ (null)) } });
|
|
1106
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1085
1107
|
}
|
|
1086
1108
|
/**
|
|
1087
1109
|
* Overrides the template of the given component, compiling the template
|
|
@@ -1094,7 +1116,7 @@ class TestBedRender3 {
|
|
|
1094
1116
|
*/
|
|
1095
1117
|
static overrideTemplateUsingTestingModule(component, template) {
|
|
1096
1118
|
_getTestBedRender3().overrideTemplateUsingTestingModule(component, template);
|
|
1097
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1119
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1098
1120
|
}
|
|
1099
1121
|
/**
|
|
1100
1122
|
* @param {?} component
|
|
@@ -1102,7 +1124,10 @@ class TestBedRender3 {
|
|
|
1102
1124
|
* @return {?}
|
|
1103
1125
|
*/
|
|
1104
1126
|
overrideTemplateUsingTestingModule(component, template) {
|
|
1105
|
-
|
|
1127
|
+
if (this._instantiated) {
|
|
1128
|
+
throw new Error('Cannot override template when the test module has already been instantiated');
|
|
1129
|
+
}
|
|
1130
|
+
this._templateOverrides.set(component, template);
|
|
1106
1131
|
}
|
|
1107
1132
|
/**
|
|
1108
1133
|
* @param {?} token
|
|
@@ -1111,7 +1136,7 @@ class TestBedRender3 {
|
|
|
1111
1136
|
*/
|
|
1112
1137
|
static overrideProvider(token, provider) {
|
|
1113
1138
|
_getTestBedRender3().overrideProvider(token, provider);
|
|
1114
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1139
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1115
1140
|
}
|
|
1116
1141
|
/**
|
|
1117
1142
|
* @param {?} token
|
|
@@ -1142,7 +1167,7 @@ class TestBedRender3 {
|
|
|
1142
1167
|
*/
|
|
1143
1168
|
static resetTestingModule() {
|
|
1144
1169
|
_getTestBedRender3().resetTestingModule();
|
|
1145
|
-
return /** @type {?} */ ((TestBedRender3));
|
|
1170
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
|
|
1146
1171
|
}
|
|
1147
1172
|
/**
|
|
1148
1173
|
* Initialize the environment for testing with a compiler factory, a PlatformRef, and an
|
|
@@ -1176,13 +1201,14 @@ class TestBedRender3 {
|
|
|
1176
1201
|
*/
|
|
1177
1202
|
resetTestEnvironment() {
|
|
1178
1203
|
this.resetTestingModule();
|
|
1179
|
-
this.platform = /** @type {?} */ (
|
|
1180
|
-
this.ngModule = /** @type {?} */ (
|
|
1204
|
+
this.platform = (/** @type {?} */ (null));
|
|
1205
|
+
this.ngModule = (/** @type {?} */ (null));
|
|
1181
1206
|
}
|
|
1182
1207
|
/**
|
|
1183
1208
|
* @return {?}
|
|
1184
1209
|
*/
|
|
1185
1210
|
resetTestingModule() {
|
|
1211
|
+
ɵresetCompiledComponents();
|
|
1186
1212
|
// reset metadata overrides
|
|
1187
1213
|
this._moduleOverrides = [];
|
|
1188
1214
|
this._componentOverrides = [];
|
|
@@ -1190,12 +1216,15 @@ class TestBedRender3 {
|
|
|
1190
1216
|
this._pipeOverrides = [];
|
|
1191
1217
|
this._providerOverrides = [];
|
|
1192
1218
|
this._rootProviderOverrides = [];
|
|
1219
|
+
this._providerOverridesByToken.clear();
|
|
1220
|
+
this._templateOverrides.clear();
|
|
1193
1221
|
// reset test module config
|
|
1194
1222
|
this._providers = [];
|
|
1195
1223
|
this._declarations = [];
|
|
1196
1224
|
this._imports = [];
|
|
1197
1225
|
this._schemas = [];
|
|
1198
|
-
this._moduleRef = /** @type {?} */ (
|
|
1226
|
+
this._moduleRef = (/** @type {?} */ (null));
|
|
1227
|
+
this._testModuleType = (/** @type {?} */ (null));
|
|
1199
1228
|
this._instantiated = false;
|
|
1200
1229
|
this._activeFixtures.forEach((fixture) => {
|
|
1201
1230
|
try {
|
|
@@ -1317,18 +1346,22 @@ class TestBedRender3 {
|
|
|
1317
1346
|
*/
|
|
1318
1347
|
overrideProvider(token, provider) {
|
|
1319
1348
|
/** @type {?} */
|
|
1349
|
+
const providerDef = provider.useFactory ?
|
|
1350
|
+
{ provide: token, useFactory: provider.useFactory, deps: provider.deps || [] } :
|
|
1351
|
+
{ provide: token, useValue: provider.useValue };
|
|
1352
|
+
/** @type {?} */
|
|
1320
1353
|
let injectableDef;
|
|
1321
1354
|
/** @type {?} */
|
|
1322
1355
|
const isRoot = (typeof token !== 'string' && (injectableDef = ɵgetInjectableDef(token)) &&
|
|
1323
1356
|
injectableDef.providedIn === 'root');
|
|
1324
1357
|
/** @type {?} */
|
|
1325
|
-
const
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
}
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1358
|
+
const overridesBucket = isRoot ? this._rootProviderOverrides : this._providerOverrides;
|
|
1359
|
+
overridesBucket.push(providerDef);
|
|
1360
|
+
// keep all overrides grouped by token as well for fast lookups using token
|
|
1361
|
+
/** @type {?} */
|
|
1362
|
+
const overridesForToken = this._providerOverridesByToken.get(token) || [];
|
|
1363
|
+
overridesForToken.push(providerDef);
|
|
1364
|
+
this._providerOverridesByToken.set(token, overridesForToken);
|
|
1332
1365
|
}
|
|
1333
1366
|
/**
|
|
1334
1367
|
* @param {?} token
|
|
@@ -1351,7 +1384,7 @@ class TestBedRender3 {
|
|
|
1351
1384
|
const rootElId = `root${_nextRootElementId++}`;
|
|
1352
1385
|
testComponentRenderer.insertRootElement(rootElId);
|
|
1353
1386
|
/** @nocollapse @type {?} */
|
|
1354
|
-
const componentDef = (/** @type {?} */ (type)).ngComponentDef;
|
|
1387
|
+
const componentDef = ((/** @type {?} */ (type))).ngComponentDef;
|
|
1355
1388
|
if (!componentDef) {
|
|
1356
1389
|
throw new Error(`It looks like '${ɵstringify(type)}' has not been IVY compiled - it has no 'ngComponentDef' field`);
|
|
1357
1390
|
}
|
|
@@ -1374,7 +1407,9 @@ class TestBedRender3 {
|
|
|
1374
1407
|
this._activeFixtures.push(fixture);
|
|
1375
1408
|
return fixture;
|
|
1376
1409
|
}
|
|
1410
|
+
// internal methods
|
|
1377
1411
|
/**
|
|
1412
|
+
* @private
|
|
1378
1413
|
* @return {?}
|
|
1379
1414
|
*/
|
|
1380
1415
|
_initIfNeeded() {
|
|
@@ -1383,15 +1418,32 @@ class TestBedRender3 {
|
|
|
1383
1418
|
}
|
|
1384
1419
|
/** @type {?} */
|
|
1385
1420
|
const resolvers = this._getResolvers();
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
compileNgModule(testModuleType, resolvers);
|
|
1421
|
+
this._testModuleType = this._createTestModule();
|
|
1422
|
+
this._compileNgModule(this._testModuleType, resolvers);
|
|
1389
1423
|
/** @type {?} */
|
|
1390
1424
|
const parentInjector = this.platform.injector;
|
|
1391
|
-
this._moduleRef = new ɵRender3NgModuleRef(
|
|
1425
|
+
this._moduleRef = new ɵRender3NgModuleRef(this._testModuleType, parentInjector);
|
|
1426
|
+
// ApplicationInitStatus.runInitializers() is marked @internal
|
|
1427
|
+
// to core. Cast it to any before accessing it.
|
|
1428
|
+
((/** @type {?} */ (this._moduleRef.injector.get(ApplicationInitStatus)))).runInitializers();
|
|
1392
1429
|
this._instantiated = true;
|
|
1393
1430
|
}
|
|
1431
|
+
// get overrides for a specific provider (if any)
|
|
1394
1432
|
/**
|
|
1433
|
+
* @private
|
|
1434
|
+
* @param {?} provider
|
|
1435
|
+
* @return {?}
|
|
1436
|
+
*/
|
|
1437
|
+
_getProviderOverrides(provider) {
|
|
1438
|
+
/** @type {?} */
|
|
1439
|
+
const token = typeof provider === 'object' && provider.hasOwnProperty('provide') ?
|
|
1440
|
+
provider.provide :
|
|
1441
|
+
provider;
|
|
1442
|
+
return this._providerOverridesByToken.get(token) || [];
|
|
1443
|
+
}
|
|
1444
|
+
// creates resolvers taking overrides into account
|
|
1445
|
+
/**
|
|
1446
|
+
* @private
|
|
1395
1447
|
* @return {?}
|
|
1396
1448
|
*/
|
|
1397
1449
|
_getResolvers() {
|
|
@@ -1410,6 +1462,7 @@ class TestBedRender3 {
|
|
|
1410
1462
|
return { module, component, directive, pipe };
|
|
1411
1463
|
}
|
|
1412
1464
|
/**
|
|
1465
|
+
* @private
|
|
1413
1466
|
* @param {?} methodName
|
|
1414
1467
|
* @param {?} methodDescription
|
|
1415
1468
|
* @return {?}
|
|
@@ -1421,6 +1474,7 @@ class TestBedRender3 {
|
|
|
1421
1474
|
}
|
|
1422
1475
|
}
|
|
1423
1476
|
/**
|
|
1477
|
+
* @private
|
|
1424
1478
|
* @return {?}
|
|
1425
1479
|
*/
|
|
1426
1480
|
_createTestModule() {
|
|
@@ -1449,157 +1503,202 @@ class TestBedRender3 {
|
|
|
1449
1503
|
DynamicTestModule.decorators = [
|
|
1450
1504
|
{ type: NgModule, args: [{ providers, declarations, imports, schemas, jit: true },] },
|
|
1451
1505
|
];
|
|
1452
|
-
return DynamicTestModule;
|
|
1506
|
+
return (/** @type {?} */ (DynamicTestModule));
|
|
1453
1507
|
}
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
return testBed = testBed || new TestBedRender3();
|
|
1462
|
-
}
|
|
1463
|
-
/** @type {?} */
|
|
1464
|
-
const EMPTY_ARRAY = [];
|
|
1465
|
-
/**
|
|
1466
|
-
* @param {?} moduleType
|
|
1467
|
-
* @param {?} resolvers
|
|
1468
|
-
* @return {?}
|
|
1469
|
-
*/
|
|
1470
|
-
function compileNgModule(moduleType, resolvers) {
|
|
1471
|
-
/** @type {?} */
|
|
1472
|
-
const ngModule = resolvers.module.resolve(moduleType);
|
|
1473
|
-
if (ngModule === null) {
|
|
1474
|
-
throw new Error(`${ɵstringify(moduleType)} has not @NgModule annotation`);
|
|
1475
|
-
}
|
|
1476
|
-
ɵcompileNgModuleDefs(moduleType, ngModule);
|
|
1477
|
-
/** @type {?} */
|
|
1478
|
-
const declarations = flatten(ngModule.declarations || EMPTY_ARRAY);
|
|
1479
|
-
/** @type {?} */
|
|
1480
|
-
const compiledComponents = [];
|
|
1481
|
-
// Compile the components, directives and pipes declared by this module
|
|
1482
|
-
declarations.forEach(declaration => {
|
|
1483
|
-
/** @type {?} */
|
|
1484
|
-
const component = resolvers.component.resolve(declaration);
|
|
1485
|
-
if (component) {
|
|
1486
|
-
ɵcompileComponent(declaration, component);
|
|
1487
|
-
compiledComponents.push(declaration);
|
|
1488
|
-
return;
|
|
1489
|
-
}
|
|
1508
|
+
/**
|
|
1509
|
+
* @private
|
|
1510
|
+
* @param {?} meta
|
|
1511
|
+
* @param {?=} type
|
|
1512
|
+
* @return {?}
|
|
1513
|
+
*/
|
|
1514
|
+
_getMetaWithOverrides(meta, type) {
|
|
1490
1515
|
/** @type {?} */
|
|
1491
|
-
const
|
|
1492
|
-
if (
|
|
1493
|
-
|
|
1494
|
-
|
|
1516
|
+
const overrides = {};
|
|
1517
|
+
if (meta.providers && meta.providers.length) {
|
|
1518
|
+
/** @type {?} */
|
|
1519
|
+
const providerOverrides = flatten(meta.providers, (provider) => this._getProviderOverrides(provider));
|
|
1520
|
+
if (providerOverrides.length) {
|
|
1521
|
+
overrides.providers = [...meta.providers, ...providerOverrides];
|
|
1522
|
+
}
|
|
1495
1523
|
}
|
|
1496
1524
|
/** @type {?} */
|
|
1497
|
-
const
|
|
1498
|
-
if (
|
|
1499
|
-
|
|
1500
|
-
return;
|
|
1525
|
+
const hasTemplateOverride = !!type && this._templateOverrides.has(type);
|
|
1526
|
+
if (hasTemplateOverride) {
|
|
1527
|
+
overrides.template = this._templateOverrides.get((/** @type {?} */ (type)));
|
|
1501
1528
|
}
|
|
1502
|
-
|
|
1503
|
-
/** @type {?} */
|
|
1504
|
-
const transitiveScope = transitiveScopesFor(moduleType, resolvers);
|
|
1505
|
-
compiledComponents.forEach(cmp => ɵpatchComponentDefWithScope((/** @type {?} */ (cmp)).ngComponentDef, transitiveScope));
|
|
1506
|
-
}
|
|
1507
|
-
/**
|
|
1508
|
-
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
|
|
1509
|
-
*
|
|
1510
|
-
* This operation is memoized and the result is cached on the module's definition. It can be called
|
|
1511
|
-
* on modules with components that have not fully compiled yet, but the result should not be used
|
|
1512
|
-
* until they have.
|
|
1513
|
-
* @template T
|
|
1514
|
-
* @param {?} moduleType
|
|
1515
|
-
* @param {?} resolvers
|
|
1516
|
-
* @return {?}
|
|
1517
|
-
*/
|
|
1518
|
-
function transitiveScopesFor(moduleType, resolvers) {
|
|
1519
|
-
if (!isNgModule(moduleType)) {
|
|
1520
|
-
throw new Error(`${moduleType.name} does not have an ngModuleDef`);
|
|
1521
|
-
}
|
|
1522
|
-
/** @nocollapse @type {?} */
|
|
1523
|
-
const def = moduleType.ngModuleDef;
|
|
1524
|
-
if (def.transitiveCompileScopes !== null) {
|
|
1525
|
-
return def.transitiveCompileScopes;
|
|
1529
|
+
return Object.keys(overrides).length ? Object.assign({}, meta, overrides) : meta;
|
|
1526
1530
|
}
|
|
1527
|
-
/**
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
directives: new Set(),
|
|
1535
|
-
pipes: new Set(),
|
|
1536
|
-
},
|
|
1537
|
-
};
|
|
1538
|
-
def.declarations.forEach(declared => {
|
|
1539
|
-
/** @type {?} */
|
|
1540
|
-
const declaredWithDefs = /** @type {?} */ (declared);
|
|
1541
|
-
if (declaredWithDefs.ngPipeDef !== undefined) {
|
|
1542
|
-
scopes.compilation.pipes.add(declared);
|
|
1543
|
-
}
|
|
1544
|
-
else {
|
|
1545
|
-
scopes.compilation.directives.add(declared);
|
|
1546
|
-
}
|
|
1547
|
-
});
|
|
1548
|
-
def.imports.forEach((imported) => {
|
|
1531
|
+
/**
|
|
1532
|
+
* @private
|
|
1533
|
+
* @param {?} moduleType
|
|
1534
|
+
* @param {?} resolvers
|
|
1535
|
+
* @return {?}
|
|
1536
|
+
*/
|
|
1537
|
+
_compileNgModule(moduleType, resolvers) {
|
|
1549
1538
|
/** @type {?} */
|
|
1550
|
-
const ngModule = resolvers.module.resolve(
|
|
1539
|
+
const ngModule = resolvers.module.resolve(moduleType);
|
|
1551
1540
|
if (ngModule === null) {
|
|
1552
|
-
throw new Error(
|
|
1553
|
-
}
|
|
1554
|
-
else {
|
|
1555
|
-
compileNgModule(imported, resolvers);
|
|
1541
|
+
throw new Error(`${ɵstringify(moduleType)} has not @NgModule annotation`);
|
|
1556
1542
|
}
|
|
1557
1543
|
/** @type {?} */
|
|
1558
|
-
const
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
def.exports.forEach((exported) => {
|
|
1544
|
+
const metadata = this._getMetaWithOverrides(ngModule);
|
|
1545
|
+
ɵcompileNgModuleDefs(moduleType, metadata);
|
|
1546
|
+
/** @type {?} */
|
|
1547
|
+
const declarations = flatten(ngModule.declarations || EMPTY_ARRAY, resolveForwardRef);
|
|
1563
1548
|
/** @type {?} */
|
|
1564
|
-
const
|
|
1565
|
-
//
|
|
1566
|
-
|
|
1567
|
-
if (isNgModule(exportedTyped)) {
|
|
1549
|
+
const compiledComponents = [];
|
|
1550
|
+
// Compile the components, directives and pipes declared by this module
|
|
1551
|
+
declarations.forEach(declaration => {
|
|
1568
1552
|
/** @type {?} */
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1553
|
+
const component = resolvers.component.resolve(declaration);
|
|
1554
|
+
if (component) {
|
|
1555
|
+
/** @type {?} */
|
|
1556
|
+
const metadata = this._getMetaWithOverrides(component, declaration);
|
|
1557
|
+
ɵcompileComponent(declaration, metadata);
|
|
1558
|
+
compiledComponents.push(declaration);
|
|
1559
|
+
return;
|
|
1560
|
+
}
|
|
1561
|
+
/** @type {?} */
|
|
1562
|
+
const directive = resolvers.directive.resolve(declaration);
|
|
1563
|
+
if (directive) {
|
|
1564
|
+
/** @type {?} */
|
|
1565
|
+
const metadata = this._getMetaWithOverrides(directive);
|
|
1566
|
+
ɵcompileDirective(declaration, metadata);
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
/** @type {?} */
|
|
1570
|
+
const pipe = resolvers.pipe.resolve(declaration);
|
|
1571
|
+
if (pipe) {
|
|
1572
|
+
ɵcompilePipe(declaration, pipe);
|
|
1573
|
+
return;
|
|
1574
|
+
}
|
|
1575
|
+
});
|
|
1576
|
+
// Compile transitive modules, components, directives and pipes
|
|
1577
|
+
/** @type {?} */
|
|
1578
|
+
const transitiveScope = this._transitiveScopesFor(moduleType, resolvers);
|
|
1579
|
+
compiledComponents.forEach(cmp => {
|
|
1580
|
+
/** @type {?} */
|
|
1581
|
+
const scope = this._templateOverrides.has(cmp) ?
|
|
1582
|
+
// if we have template override via `TestBed.overrideTemplateUsingTestingModule` -
|
|
1583
|
+
// define Component scope as TestingModule scope, instead of the scope of NgModule
|
|
1584
|
+
// where this Component was declared
|
|
1585
|
+
this._transitiveScopesFor(this._testModuleType, resolvers) :
|
|
1586
|
+
transitiveScope;
|
|
1587
|
+
ɵpatchComponentDefWithScope(((/** @type {?} */ (cmp))).ngComponentDef, scope);
|
|
1588
|
+
});
|
|
1589
|
+
}
|
|
1590
|
+
/**
|
|
1591
|
+
* Compute the pair of transitive scopes (compilation scope and exported scope) for a given
|
|
1592
|
+
* module.
|
|
1593
|
+
*
|
|
1594
|
+
* This operation is memoized and the result is cached on the module's definition. It can be
|
|
1595
|
+
* called on modules with components that have not fully compiled yet, but the result should not
|
|
1596
|
+
* be used until they have.
|
|
1597
|
+
* @private
|
|
1598
|
+
* @template T
|
|
1599
|
+
* @param {?} moduleType
|
|
1600
|
+
* @param {?} resolvers
|
|
1601
|
+
* @return {?}
|
|
1602
|
+
*/
|
|
1603
|
+
_transitiveScopesFor(moduleType, resolvers) {
|
|
1604
|
+
if (!isNgModule(moduleType)) {
|
|
1605
|
+
throw new Error(`${moduleType.name} does not have an ngModuleDef`);
|
|
1584
1606
|
}
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1607
|
+
/** @nocollapse @type {?} */
|
|
1608
|
+
const def = moduleType.ngModuleDef;
|
|
1609
|
+
if (def.transitiveCompileScopes !== null) {
|
|
1610
|
+
return def.transitiveCompileScopes;
|
|
1611
|
+
}
|
|
1612
|
+
/** @type {?} */
|
|
1613
|
+
const scopes = {
|
|
1614
|
+
compilation: {
|
|
1615
|
+
directives: new Set(),
|
|
1616
|
+
pipes: new Set(),
|
|
1617
|
+
},
|
|
1618
|
+
exported: {
|
|
1619
|
+
directives: new Set(),
|
|
1620
|
+
pipes: new Set(),
|
|
1621
|
+
},
|
|
1622
|
+
};
|
|
1623
|
+
def.declarations.forEach(declared => {
|
|
1624
|
+
/** @type {?} */
|
|
1625
|
+
const declaredWithDefs = (/** @type {?} */ (declared));
|
|
1626
|
+
if (declaredWithDefs.ngPipeDef !== undefined) {
|
|
1627
|
+
scopes.compilation.pipes.add(declared);
|
|
1628
|
+
}
|
|
1629
|
+
else {
|
|
1630
|
+
scopes.compilation.directives.add(declared);
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
def.imports.forEach((imported) => {
|
|
1634
|
+
/** @type {?} */
|
|
1635
|
+
const ngModule = resolvers.module.resolve(imported);
|
|
1636
|
+
if (ngModule === null) {
|
|
1637
|
+
throw new Error(`Importing ${imported.name} which does not have an @ngModule`);
|
|
1638
|
+
}
|
|
1639
|
+
else {
|
|
1640
|
+
this._compileNgModule(imported, resolvers);
|
|
1641
|
+
}
|
|
1642
|
+
// When this module imports another, the imported module's exported directives and pipes are
|
|
1643
|
+
// added to the compilation scope of this module.
|
|
1644
|
+
/** @type {?} */
|
|
1645
|
+
const importedScope = this._transitiveScopesFor(imported, resolvers);
|
|
1646
|
+
importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));
|
|
1647
|
+
importedScope.exported.pipes.forEach(entry => scopes.compilation.pipes.add(entry));
|
|
1648
|
+
});
|
|
1649
|
+
def.exports.forEach((exported) => {
|
|
1650
|
+
/** @type {?} */
|
|
1651
|
+
const exportedTyped = (/** @type {?} */ (exported));
|
|
1652
|
+
// Either the type is a module, a pipe, or a component/directive (which may not have an
|
|
1653
|
+
// ngComponentDef as it might be compiled asynchronously).
|
|
1654
|
+
if (isNgModule(exportedTyped)) {
|
|
1655
|
+
// When this module exports another, the exported module's exported directives and pipes are
|
|
1656
|
+
// added to both the compilation and exported scopes of this module.
|
|
1657
|
+
/** @type {?} */
|
|
1658
|
+
const exportedScope = this._transitiveScopesFor(exportedTyped, resolvers);
|
|
1659
|
+
exportedScope.exported.directives.forEach(entry => {
|
|
1660
|
+
scopes.compilation.directives.add(entry);
|
|
1661
|
+
scopes.exported.directives.add(entry);
|
|
1662
|
+
});
|
|
1663
|
+
exportedScope.exported.pipes.forEach(entry => {
|
|
1664
|
+
scopes.compilation.pipes.add(entry);
|
|
1665
|
+
scopes.exported.pipes.add(entry);
|
|
1666
|
+
});
|
|
1667
|
+
}
|
|
1668
|
+
else if (exportedTyped.ngPipeDef !== undefined) {
|
|
1669
|
+
scopes.exported.pipes.add(exportedTyped);
|
|
1670
|
+
}
|
|
1671
|
+
else {
|
|
1672
|
+
scopes.exported.directives.add(exportedTyped);
|
|
1673
|
+
}
|
|
1674
|
+
});
|
|
1675
|
+
def.transitiveCompileScopes = scopes;
|
|
1676
|
+
return scopes;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
/** @type {?} */
|
|
1680
|
+
let testBed;
|
|
1681
|
+
/**
|
|
1682
|
+
* @return {?}
|
|
1683
|
+
*/
|
|
1684
|
+
function _getTestBedRender3() {
|
|
1685
|
+
return testBed = testBed || new TestBedRender3();
|
|
1588
1686
|
}
|
|
1589
1687
|
/**
|
|
1590
1688
|
* @template T
|
|
1591
1689
|
* @param {?} values
|
|
1690
|
+
* @param {?=} mapFn
|
|
1592
1691
|
* @return {?}
|
|
1593
1692
|
*/
|
|
1594
|
-
function flatten(values) {
|
|
1693
|
+
function flatten(values, mapFn) {
|
|
1595
1694
|
/** @type {?} */
|
|
1596
1695
|
const out = [];
|
|
1597
1696
|
values.forEach(value => {
|
|
1598
1697
|
if (Array.isArray(value)) {
|
|
1599
|
-
out.push(...flatten(value));
|
|
1698
|
+
out.push(...flatten(value, mapFn));
|
|
1600
1699
|
}
|
|
1601
1700
|
else {
|
|
1602
|
-
out.push(value);
|
|
1701
|
+
out.push(mapFn ? mapFn(value) : value);
|
|
1603
1702
|
}
|
|
1604
1703
|
});
|
|
1605
1704
|
return out;
|
|
@@ -1610,12 +1709,12 @@ function flatten(values) {
|
|
|
1610
1709
|
* @return {?}
|
|
1611
1710
|
*/
|
|
1612
1711
|
function isNgModule(value) {
|
|
1613
|
-
return (/** @type {?} */ (value)).ngModuleDef !== undefined;
|
|
1712
|
+
return ((/** @type {?} */ (value))).ngModuleDef !== undefined;
|
|
1614
1713
|
}
|
|
1615
1714
|
|
|
1616
1715
|
/**
|
|
1617
1716
|
* @fileoverview added by tsickle
|
|
1618
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1717
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1619
1718
|
*/
|
|
1620
1719
|
/**
|
|
1621
1720
|
* @return {?}
|
|
@@ -1703,12 +1802,13 @@ class TestingCompilerFactory {
|
|
|
1703
1802
|
|
|
1704
1803
|
/**
|
|
1705
1804
|
* @fileoverview added by tsickle
|
|
1706
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
1805
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
1707
1806
|
*/
|
|
1708
1807
|
/** @type {?} */
|
|
1709
1808
|
const UNDEFINED = new Object();
|
|
1710
1809
|
/** @type {?} */
|
|
1711
1810
|
let _nextRootElementId$1 = 0;
|
|
1811
|
+
// WARNING: interface has both a type and a value, skipping emit
|
|
1712
1812
|
/**
|
|
1713
1813
|
* \@description
|
|
1714
1814
|
* Configures and initializes environment for unit testing and provides methods for
|
|
@@ -1722,9 +1822,9 @@ let _nextRootElementId$1 = 0;
|
|
|
1722
1822
|
class TestBedViewEngine {
|
|
1723
1823
|
constructor() {
|
|
1724
1824
|
this._instantiated = false;
|
|
1725
|
-
this._compiler = /** @type {?} */ (
|
|
1726
|
-
this._moduleRef = /** @type {?} */ (
|
|
1727
|
-
this._moduleFactory = /** @type {?} */ (
|
|
1825
|
+
this._compiler = (/** @type {?} */ (null));
|
|
1826
|
+
this._moduleRef = (/** @type {?} */ (null));
|
|
1827
|
+
this._moduleFactory = (/** @type {?} */ (null));
|
|
1728
1828
|
this._compilerOptions = [];
|
|
1729
1829
|
this._moduleOverrides = [];
|
|
1730
1830
|
this._componentOverrides = [];
|
|
@@ -1740,8 +1840,8 @@ class TestBedViewEngine {
|
|
|
1740
1840
|
this._templateOverrides = [];
|
|
1741
1841
|
this._isRoot = true;
|
|
1742
1842
|
this._rootProviderOverrides = [];
|
|
1743
|
-
this.platform = /** @type {?} */ (
|
|
1744
|
-
this.ngModule = /** @type {?} */ (
|
|
1843
|
+
this.platform = (/** @type {?} */ (null));
|
|
1844
|
+
this.ngModule = (/** @type {?} */ (null));
|
|
1745
1845
|
}
|
|
1746
1846
|
/**
|
|
1747
1847
|
* Initialize the environment for testing with a compiler factory, a PlatformRef, and an
|
|
@@ -1774,7 +1874,7 @@ class TestBedViewEngine {
|
|
|
1774
1874
|
*/
|
|
1775
1875
|
static resetTestingModule() {
|
|
1776
1876
|
_getTestBedViewEngine().resetTestingModule();
|
|
1777
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1877
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1778
1878
|
}
|
|
1779
1879
|
/**
|
|
1780
1880
|
* Allows overriding default compiler providers and settings
|
|
@@ -1784,7 +1884,7 @@ class TestBedViewEngine {
|
|
|
1784
1884
|
*/
|
|
1785
1885
|
static configureCompiler(config) {
|
|
1786
1886
|
_getTestBedViewEngine().configureCompiler(config);
|
|
1787
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1887
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1788
1888
|
}
|
|
1789
1889
|
/**
|
|
1790
1890
|
* Allows overriding default providers, directives, pipes, modules of the test injector,
|
|
@@ -1794,7 +1894,7 @@ class TestBedViewEngine {
|
|
|
1794
1894
|
*/
|
|
1795
1895
|
static configureTestingModule(moduleDef) {
|
|
1796
1896
|
_getTestBedViewEngine().configureTestingModule(moduleDef);
|
|
1797
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1897
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1798
1898
|
}
|
|
1799
1899
|
/**
|
|
1800
1900
|
* Compile components with a `templateUrl` for the test's NgModule.
|
|
@@ -1810,7 +1910,7 @@ class TestBedViewEngine {
|
|
|
1810
1910
|
*/
|
|
1811
1911
|
static overrideModule(ngModule, override) {
|
|
1812
1912
|
_getTestBedViewEngine().overrideModule(ngModule, override);
|
|
1813
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1913
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1814
1914
|
}
|
|
1815
1915
|
/**
|
|
1816
1916
|
* @param {?} component
|
|
@@ -1819,7 +1919,7 @@ class TestBedViewEngine {
|
|
|
1819
1919
|
*/
|
|
1820
1920
|
static overrideComponent(component, override) {
|
|
1821
1921
|
_getTestBedViewEngine().overrideComponent(component, override);
|
|
1822
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1922
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1823
1923
|
}
|
|
1824
1924
|
/**
|
|
1825
1925
|
* @param {?} directive
|
|
@@ -1828,7 +1928,7 @@ class TestBedViewEngine {
|
|
|
1828
1928
|
*/
|
|
1829
1929
|
static overrideDirective(directive, override) {
|
|
1830
1930
|
_getTestBedViewEngine().overrideDirective(directive, override);
|
|
1831
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1931
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1832
1932
|
}
|
|
1833
1933
|
/**
|
|
1834
1934
|
* @param {?} pipe
|
|
@@ -1837,7 +1937,7 @@ class TestBedViewEngine {
|
|
|
1837
1937
|
*/
|
|
1838
1938
|
static overridePipe(pipe, override) {
|
|
1839
1939
|
_getTestBedViewEngine().overridePipe(pipe, override);
|
|
1840
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1940
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1841
1941
|
}
|
|
1842
1942
|
/**
|
|
1843
1943
|
* @param {?} component
|
|
@@ -1845,8 +1945,8 @@ class TestBedViewEngine {
|
|
|
1845
1945
|
* @return {?}
|
|
1846
1946
|
*/
|
|
1847
1947
|
static overrideTemplate(component, template) {
|
|
1848
|
-
_getTestBedViewEngine().overrideComponent(component, { set: { template, templateUrl: /** @type {?} */ (
|
|
1849
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1948
|
+
_getTestBedViewEngine().overrideComponent(component, { set: { template, templateUrl: (/** @type {?} */ (null)) } });
|
|
1949
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1850
1950
|
}
|
|
1851
1951
|
/**
|
|
1852
1952
|
* Overrides the template of the given component, compiling the template
|
|
@@ -1859,7 +1959,7 @@ class TestBedViewEngine {
|
|
|
1859
1959
|
*/
|
|
1860
1960
|
static overrideTemplateUsingTestingModule(component, template) {
|
|
1861
1961
|
_getTestBedViewEngine().overrideTemplateUsingTestingModule(component, template);
|
|
1862
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1962
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1863
1963
|
}
|
|
1864
1964
|
/**
|
|
1865
1965
|
* @param {?} token
|
|
@@ -1867,8 +1967,8 @@ class TestBedViewEngine {
|
|
|
1867
1967
|
* @return {?}
|
|
1868
1968
|
*/
|
|
1869
1969
|
static overrideProvider(token, provider) {
|
|
1870
|
-
_getTestBedViewEngine().overrideProvider(token, /** @type {?} */ (provider));
|
|
1871
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1970
|
+
_getTestBedViewEngine().overrideProvider(token, (/** @type {?} */ (provider)));
|
|
1971
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1872
1972
|
}
|
|
1873
1973
|
/**
|
|
1874
1974
|
* @param {?} token
|
|
@@ -1876,8 +1976,8 @@ class TestBedViewEngine {
|
|
|
1876
1976
|
* @return {?}
|
|
1877
1977
|
*/
|
|
1878
1978
|
static deprecatedOverrideProvider(token, provider) {
|
|
1879
|
-
_getTestBedViewEngine().deprecatedOverrideProvider(token, /** @type {?} */ (provider));
|
|
1880
|
-
return /** @type {?} */ ((TestBedViewEngine));
|
|
1979
|
+
_getTestBedViewEngine().deprecatedOverrideProvider(token, (/** @type {?} */ (provider)));
|
|
1980
|
+
return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
1881
1981
|
}
|
|
1882
1982
|
/**
|
|
1883
1983
|
* @param {?} token
|
|
@@ -1926,8 +2026,8 @@ class TestBedViewEngine {
|
|
|
1926
2026
|
*/
|
|
1927
2027
|
resetTestEnvironment() {
|
|
1928
2028
|
this.resetTestingModule();
|
|
1929
|
-
this.platform = /** @type {?} */ (
|
|
1930
|
-
this.ngModule = /** @type {?} */ (
|
|
2029
|
+
this.platform = (/** @type {?} */ (null));
|
|
2030
|
+
this.ngModule = (/** @type {?} */ (null));
|
|
1931
2031
|
this._testEnvAotSummaries = () => [];
|
|
1932
2032
|
}
|
|
1933
2033
|
/**
|
|
@@ -1937,15 +2037,15 @@ class TestBedViewEngine {
|
|
|
1937
2037
|
ɵclearOverrides();
|
|
1938
2038
|
this._aotSummaries = [];
|
|
1939
2039
|
this._templateOverrides = [];
|
|
1940
|
-
this._compiler = /** @type {?} */ (
|
|
2040
|
+
this._compiler = (/** @type {?} */ (null));
|
|
1941
2041
|
this._moduleOverrides = [];
|
|
1942
2042
|
this._componentOverrides = [];
|
|
1943
2043
|
this._directiveOverrides = [];
|
|
1944
2044
|
this._pipeOverrides = [];
|
|
1945
2045
|
this._isRoot = true;
|
|
1946
2046
|
this._rootProviderOverrides = [];
|
|
1947
|
-
this._moduleRef = /** @type {?} */ (
|
|
1948
|
-
this._moduleFactory = /** @type {?} */ (
|
|
2047
|
+
this._moduleRef = (/** @type {?} */ (null));
|
|
2048
|
+
this._moduleFactory = (/** @type {?} */ (null));
|
|
1949
2049
|
this._compilerOptions = [];
|
|
1950
2050
|
this._providers = [];
|
|
1951
2051
|
this._declarations = [];
|
|
@@ -2010,6 +2110,7 @@ class TestBedViewEngine {
|
|
|
2010
2110
|
});
|
|
2011
2111
|
}
|
|
2012
2112
|
/**
|
|
2113
|
+
* @private
|
|
2013
2114
|
* @return {?}
|
|
2014
2115
|
*/
|
|
2015
2116
|
_initIfNeeded() {
|
|
@@ -2053,10 +2154,11 @@ class TestBedViewEngine {
|
|
|
2053
2154
|
this._moduleRef = this._moduleFactory.create(ngZoneInjector);
|
|
2054
2155
|
// ApplicationInitStatus.runInitializers() is marked @internal to core. So casting to any
|
|
2055
2156
|
// before accessing it.
|
|
2056
|
-
(/** @type {?} */ (this._moduleRef.injector.get(ApplicationInitStatus))).runInitializers();
|
|
2157
|
+
((/** @type {?} */ (this._moduleRef.injector.get(ApplicationInitStatus)))).runInitializers();
|
|
2057
2158
|
this._instantiated = true;
|
|
2058
2159
|
}
|
|
2059
2160
|
/**
|
|
2161
|
+
* @private
|
|
2060
2162
|
* @return {?}
|
|
2061
2163
|
*/
|
|
2062
2164
|
_createCompilerAndModule() {
|
|
@@ -2104,6 +2206,7 @@ class TestBedViewEngine {
|
|
|
2104
2206
|
return DynamicTestModule;
|
|
2105
2207
|
}
|
|
2106
2208
|
/**
|
|
2209
|
+
* @private
|
|
2107
2210
|
* @param {?} methodName
|
|
2108
2211
|
* @param {?} methodDescription
|
|
2109
2212
|
* @return {?}
|
|
@@ -2124,6 +2227,8 @@ class TestBedViewEngine {
|
|
|
2124
2227
|
if (token === TestBed) {
|
|
2125
2228
|
return this;
|
|
2126
2229
|
}
|
|
2230
|
+
// Tests can inject things from the ng module and from the compiler,
|
|
2231
|
+
// but the ng module can't inject things from the compiler and vice versa.
|
|
2127
2232
|
/** @type {?} */
|
|
2128
2233
|
const result = this._moduleRef.injector.get(token, UNDEFINED);
|
|
2129
2234
|
return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue) : result;
|
|
@@ -2190,9 +2295,10 @@ class TestBedViewEngine {
|
|
|
2190
2295
|
* @return {?}
|
|
2191
2296
|
*/
|
|
2192
2297
|
deprecatedOverrideProvider(token, provider) {
|
|
2193
|
-
this.overrideProviderImpl(token, provider, /* deprecated */
|
|
2298
|
+
this.overrideProviderImpl(token, provider, /* deprecated */ true);
|
|
2194
2299
|
}
|
|
2195
2300
|
/**
|
|
2301
|
+
* @private
|
|
2196
2302
|
* @param {?} token
|
|
2197
2303
|
* @param {?} provider
|
|
2198
2304
|
* @param {?=} deprecated
|
|
@@ -2296,7 +2402,7 @@ class TestBedViewEngine {
|
|
|
2296
2402
|
return fixture;
|
|
2297
2403
|
}
|
|
2298
2404
|
}
|
|
2299
|
-
/**
|
|
2405
|
+
/**
|
|
2300
2406
|
* \@description
|
|
2301
2407
|
* Configures and initializes environment for unit testing and provides methods for
|
|
2302
2408
|
* creating components and services in unit tests.
|
|
@@ -2307,15 +2413,17 @@ class TestBedViewEngine {
|
|
|
2307
2413
|
* according to the compiler used.
|
|
2308
2414
|
*
|
|
2309
2415
|
* \@publicApi
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
/**
|
|
2416
|
+
* @type {?}
|
|
2417
|
+
*/
|
|
2418
|
+
const TestBed = ɵivyEnabled ? (/** @type {?} */ ((/** @type {?} */ (TestBedRender3)))) : (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
|
|
2419
|
+
/**
|
|
2313
2420
|
* Returns a singleton of the applicable `TestBed`.
|
|
2314
2421
|
*
|
|
2315
2422
|
* It will be either an instance of `TestBedViewEngine` or `TestBedRender3`.
|
|
2316
2423
|
*
|
|
2317
2424
|
* \@publicApi
|
|
2318
|
-
|
|
2425
|
+
* @type {?}
|
|
2426
|
+
*/
|
|
2319
2427
|
const getTestBed = ɵivyEnabled ? _getTestBedRender3 : _getTestBedViewEngine;
|
|
2320
2428
|
/** @type {?} */
|
|
2321
2429
|
let testBed$1;
|
|
@@ -2384,6 +2492,7 @@ class InjectSetupWrapper {
|
|
|
2384
2492
|
this._moduleDef = _moduleDef;
|
|
2385
2493
|
}
|
|
2386
2494
|
/**
|
|
2495
|
+
* @private
|
|
2387
2496
|
* @return {?}
|
|
2388
2497
|
*/
|
|
2389
2498
|
_addModule() {
|
|
@@ -2430,10 +2539,10 @@ function withModule(moduleDef, fn) {
|
|
|
2430
2539
|
|
|
2431
2540
|
/**
|
|
2432
2541
|
* @fileoverview added by tsickle
|
|
2433
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2542
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2434
2543
|
*/
|
|
2435
2544
|
/** @type {?} */
|
|
2436
|
-
const _global$1 = /** @type {?} */ ((typeof window === 'undefined' ? global : window));
|
|
2545
|
+
const _global$1 = (/** @type {?} */ ((typeof window === 'undefined' ? global : window)));
|
|
2437
2546
|
// Reset the test providers and the fake async zone before each test.
|
|
2438
2547
|
if (_global$1.beforeEach) {
|
|
2439
2548
|
_global$1.beforeEach(() => {
|
|
@@ -2441,28 +2550,41 @@ if (_global$1.beforeEach) {
|
|
|
2441
2550
|
resetFakeAsyncZone();
|
|
2442
2551
|
});
|
|
2443
2552
|
}
|
|
2553
|
+
// TODO(juliemr): remove this, only used because we need to export something to have compilation
|
|
2554
|
+
// work.
|
|
2444
2555
|
/** @type {?} */
|
|
2445
2556
|
const __core_private_testing_placeholder__ = '';
|
|
2446
2557
|
|
|
2447
2558
|
/**
|
|
2448
2559
|
* @fileoverview added by tsickle
|
|
2449
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2560
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2561
|
+
*/
|
|
2562
|
+
/**
|
|
2563
|
+
* @license
|
|
2564
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
2565
|
+
*
|
|
2566
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
2567
|
+
* found in the LICENSE file at https://angular.io/license
|
|
2568
|
+
*/
|
|
2569
|
+
|
|
2570
|
+
/**
|
|
2571
|
+
* @fileoverview added by tsickle
|
|
2572
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2450
2573
|
*/
|
|
2451
2574
|
|
|
2452
2575
|
/**
|
|
2453
2576
|
* @fileoverview added by tsickle
|
|
2454
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2577
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2455
2578
|
*/
|
|
2456
2579
|
|
|
2457
2580
|
/**
|
|
2458
2581
|
* @fileoverview added by tsickle
|
|
2459
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2582
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2460
2583
|
*/
|
|
2461
|
-
// This file only reexports content of the `src` folder. Keep it that way.
|
|
2462
2584
|
|
|
2463
2585
|
/**
|
|
2464
2586
|
* @fileoverview added by tsickle
|
|
2465
|
-
* @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
|
|
2587
|
+
* @suppress {checkTypes,extraRequire,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
2466
2588
|
*/
|
|
2467
2589
|
|
|
2468
2590
|
/**
|