@angular/core 2.0.0-rc.1 → 2.0.0-rc.2
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.umd.js → bundles/core.umd.js} +6402 -4606
- package/bundles/core.umd.min.js +6 -0
- package/esm/index.d.ts +5 -4
- package/esm/index.js +9 -8
- package/esm/index.js.map +1 -1
- package/esm/private_export.d.ts +96 -11
- package/esm/private_export.js +39 -10
- package/esm/private_export.js.map +1 -1
- package/esm/private_export.metadata.json +1 -1
- package/esm/src/animation/active_animation_players_map.d.ts +11 -0
- package/esm/src/animation/active_animation_players_map.js +47 -0
- package/esm/src/animation/active_animation_players_map.js.map +1 -0
- package/esm/src/animation/animation_constants.d.ts +4 -0
- package/esm/src/animation/animation_constants.js +5 -0
- package/esm/src/animation/animation_constants.js.map +1 -0
- package/esm/src/animation/animation_constants.metadata.json +1 -0
- package/esm/src/animation/animation_driver.d.ts +9 -0
- package/esm/src/animation/animation_driver.js +9 -0
- package/esm/src/animation/animation_driver.js.map +1 -0
- package/esm/src/animation/animation_group_player.d.ts +18 -0
- package/esm/src/animation/animation_group_player.js +60 -0
- package/esm/src/animation/animation_group_player.js.map +1 -0
- package/esm/src/animation/animation_keyframe.d.ts +6 -0
- package/esm/src/animation/animation_keyframe.js +7 -0
- package/esm/src/animation/animation_keyframe.js.map +1 -0
- package/esm/src/animation/animation_player.d.ts +26 -0
- package/esm/src/animation/animation_player.js +30 -0
- package/esm/src/animation/animation_player.js.map +1 -0
- package/esm/src/animation/animation_sequence_player.d.ts +21 -0
- package/esm/src/animation/animation_sequence_player.js +64 -0
- package/esm/src/animation/animation_sequence_player.js.map +1 -0
- package/esm/src/animation/animation_style_util.d.ts +32 -0
- package/esm/src/animation/animation_style_util.js +91 -0
- package/esm/src/animation/animation_style_util.js.map +1 -0
- package/esm/src/animation/animation_style_util.metadata.json +1 -0
- package/esm/src/animation/animation_styles.d.ts +8 -0
- package/esm/src/animation/animation_styles.js +6 -0
- package/esm/src/animation/animation_styles.js.map +1 -0
- package/esm/src/animation/metadata.d.ts +511 -0
- package/esm/src/animation/metadata.js +565 -0
- package/esm/src/animation/metadata.js.map +1 -0
- package/esm/src/animation/metadata.metadata.json +1 -0
- package/esm/src/application_common_providers.d.ts +1 -0
- package/esm/src/application_common_providers.js +5 -4
- package/esm/src/application_common_providers.js.map +1 -1
- package/esm/src/application_common_providers.metadata.json +1 -1
- package/esm/src/application_ref.d.ts +17 -41
- package/esm/src/application_ref.js +32 -23
- package/esm/src/application_ref.js.map +1 -1
- package/esm/src/application_ref.metadata.json +1 -1
- package/esm/src/application_tokens.d.ts +6 -1
- package/esm/src/application_tokens.js +9 -4
- package/esm/src/application_tokens.js.map +1 -1
- package/esm/src/application_tokens.metadata.json +1 -1
- package/esm/src/change_detection/change_detection.d.ts +9 -8
- package/esm/src/change_detection/change_detection.js +7 -7
- package/esm/src/change_detection/change_detection.js.map +1 -1
- package/esm/src/change_detection/change_detection.metadata.json +1 -1
- package/esm/src/change_detection/change_detection_util.d.ts +3 -1
- package/esm/src/change_detection/change_detection_util.js +6 -5
- package/esm/src/change_detection/change_detection_util.js.map +1 -1
- package/esm/src/change_detection/change_detection_util.metadata.json +1 -1
- package/esm/src/change_detection/change_detector_ref.d.ts +3 -0
- package/esm/src/change_detection/change_detector_ref.js +3 -0
- package/esm/src/change_detection/change_detector_ref.js.map +1 -1
- package/esm/src/change_detection/constants.d.ts +1 -0
- package/esm/src/change_detection/constants.js +4 -3
- package/esm/src/change_detection/constants.js.map +1 -1
- package/esm/src/change_detection/constants.metadata.json +1 -1
- package/esm/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
- package/esm/src/change_detection/differs/default_iterable_differ.js +25 -18
- package/esm/src/change_detection/differs/default_iterable_differ.js.map +1 -1
- package/esm/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
- package/esm/src/change_detection/differs/default_keyvalue_differ.js +13 -8
- package/esm/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
- package/esm/src/change_detection/differs/iterable_differs.d.ts +4 -1
- package/esm/src/change_detection/differs/iterable_differs.js +5 -4
- package/esm/src/change_detection/differs/iterable_differs.js.map +1 -1
- package/esm/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
- package/esm/src/change_detection/differs/keyvalue_differs.js +5 -4
- package/esm/src/change_detection/differs/keyvalue_differs.js.map +1 -1
- package/esm/src/change_detection/pipe_transform.js.map +1 -1
- package/esm/src/change_detection.d.ts +1 -1
- package/esm/src/change_detection.js +5 -5
- package/esm/src/change_detection.js.map +1 -1
- package/esm/src/console.js +2 -1
- package/esm/src/console.js.map +1 -1
- package/esm/src/console.metadata.json +1 -1
- package/esm/src/debug/debug_node.d.ts +20 -2
- package/esm/src/debug/debug_node.js +16 -2
- package/esm/src/debug/debug_node.js.map +1 -1
- package/esm/src/debug/debug_node.metadata.json +1 -0
- package/esm/src/debug/debug_renderer.d.ts +10 -6
- package/esm/src/debug/debug_renderer.js +13 -2
- package/esm/src/debug/debug_renderer.js.map +1 -1
- package/esm/src/di/decorators.d.ts +13 -1
- package/esm/src/di/decorators.js +7 -1
- package/esm/src/di/decorators.js.map +1 -1
- package/esm/src/di/decorators.metadata.json +1 -1
- package/esm/src/di/forward_ref.d.ts +3 -1
- package/esm/src/di/forward_ref.js +3 -1
- package/esm/src/di/forward_ref.js.map +1 -1
- package/esm/src/di/injector.d.ts +4 -1
- package/esm/src/di/injector.js +5 -2
- package/esm/src/di/injector.js.map +1 -1
- package/esm/src/di/injector.metadata.json +1 -1
- package/esm/src/di/metadata.d.ts +8 -1
- package/esm/src/di/metadata.js +10 -3
- package/esm/src/di/metadata.js.map +1 -1
- package/esm/src/di/opaque_token.d.ts +2 -1
- package/esm/src/di/opaque_token.js +22 -21
- package/esm/src/di/opaque_token.js.map +1 -1
- package/esm/src/di/provider.d.ts +11 -10
- package/esm/src/di/provider.js +17 -14
- package/esm/src/di/provider.js.map +1 -1
- package/esm/src/di/provider.metadata.json +1 -0
- package/esm/src/di/provider_util.js.map +1 -1
- package/esm/src/di/provider_util.metadata.json +1 -0
- package/esm/src/di/reflective_exceptions.d.ts +11 -16
- package/esm/src/di/reflective_exceptions.js +28 -22
- package/esm/src/di/reflective_exceptions.js.map +1 -1
- package/esm/src/di/reflective_injector.d.ts +3 -33
- package/esm/src/di/reflective_injector.js +10 -7
- package/esm/src/di/reflective_injector.js.map +1 -1
- package/esm/src/di/reflective_key.d.ts +1 -8
- package/esm/src/di/reflective_key.js +3 -2
- package/esm/src/di/reflective_key.js.map +1 -1
- package/esm/src/di/reflective_provider.d.ts +2 -1
- package/esm/src/di/reflective_provider.js +6 -5
- package/esm/src/di/reflective_provider.js.map +1 -1
- package/esm/src/di/reflective_provider.metadata.json +1 -0
- package/esm/src/di.d.ts +2 -2
- package/esm/src/di.js +6 -6
- package/esm/src/di.js.map +1 -1
- package/esm/src/facade/async.d.ts +11 -4
- package/esm/src/facade/async.js +25 -15
- package/esm/src/facade/async.js.map +1 -1
- package/esm/src/facade/base_wrapped_exception.js +4 -4
- package/esm/src/facade/base_wrapped_exception.js.map +1 -1
- package/esm/src/facade/collection.js +1 -1
- package/esm/src/facade/collection.js.map +1 -1
- package/esm/src/facade/collection.metadata.json +1 -1
- package/esm/src/facade/exception_handler.d.ts +2 -11
- package/esm/src/facade/exception_handler.js +8 -7
- package/esm/src/facade/exception_handler.js.map +1 -1
- package/esm/src/facade/exceptions.d.ts +4 -0
- package/esm/src/facade/exceptions.js +6 -2
- package/esm/src/facade/exceptions.js.map +1 -1
- package/esm/src/facade/exceptions.metadata.json +1 -0
- package/esm/src/facade/lang.d.ts +6 -4
- package/esm/src/facade/lang.js +12 -11
- package/esm/src/facade/lang.js.map +1 -1
- package/esm/src/facade/lang.metadata.json +1 -1
- package/esm/src/facade/math.d.ts +2 -0
- package/esm/src/facade/math.js +4 -0
- package/esm/src/facade/math.js.map +1 -0
- package/esm/src/facade/math.metadata.json +1 -0
- package/esm/src/facade/promise.js.map +1 -1
- package/esm/src/linker/component_factory.d.ts +5 -4
- package/esm/src/linker/component_factory.js +7 -3
- package/esm/src/linker/component_factory.js.map +1 -1
- package/esm/src/linker/component_resolver.d.ts +5 -4
- package/esm/src/linker/component_resolver.js +12 -7
- package/esm/src/linker/component_resolver.js.map +1 -1
- package/esm/src/linker/component_resolver.metadata.json +1 -1
- package/esm/src/linker/debug_context.js +5 -4
- package/esm/src/linker/debug_context.js.map +1 -1
- package/esm/src/linker/dynamic_component_loader.d.ts +5 -6
- package/esm/src/linker/dynamic_component_loader.js +5 -3
- package/esm/src/linker/dynamic_component_loader.js.map +1 -1
- package/esm/src/linker/dynamic_component_loader.metadata.json +1 -1
- package/esm/src/linker/element.d.ts +3 -3
- package/esm/src/linker/element.js +5 -5
- package/esm/src/linker/element.js.map +1 -1
- package/esm/src/linker/element_injector.js.map +1 -1
- package/esm/src/linker/element_ref.d.ts +1 -0
- package/esm/src/linker/element_ref.js +5 -5
- package/esm/src/linker/element_ref.js.map +1 -1
- package/esm/src/linker/exceptions.d.ts +4 -1
- package/esm/src/linker/exceptions.js +4 -1
- package/esm/src/linker/exceptions.js.map +1 -1
- package/esm/src/linker/query_list.d.ts +3 -10
- package/esm/src/linker/query_list.js +8 -7
- package/esm/src/linker/query_list.js.map +1 -1
- package/esm/src/linker/systemjs_component_resolver.d.ts +21 -0
- package/esm/src/linker/systemjs_component_resolver.js +44 -0
- package/esm/src/linker/systemjs_component_resolver.js.map +1 -0
- package/esm/src/linker/template_ref.d.ts +2 -1
- package/esm/src/linker/template_ref.js +1 -0
- package/esm/src/linker/template_ref.js.map +1 -1
- package/esm/src/linker/view.d.ts +12 -1
- package/esm/src/linker/view.js +62 -16
- package/esm/src/linker/view.js.map +1 -1
- package/esm/src/linker/view_container_ref.d.ts +2 -10
- package/esm/src/linker/view_container_ref.js +4 -3
- package/esm/src/linker/view_container_ref.js.map +1 -1
- package/esm/src/linker/view_ref.d.ts +5 -1
- package/esm/src/linker/view_ref.js +6 -2
- package/esm/src/linker/view_ref.js.map +1 -1
- package/esm/src/linker/view_type.js.map +1 -1
- package/esm/src/linker/view_utils.d.ts +2 -4
- package/esm/src/linker/view_utils.js +21 -21
- package/esm/src/linker/view_utils.js.map +1 -1
- package/esm/src/linker/view_utils.metadata.json +1 -1
- package/esm/src/linker.d.ts +5 -4
- package/esm/src/linker.js +5 -4
- package/esm/src/linker.js.map +1 -1
- package/esm/src/metadata/di.d.ts +8 -1
- package/esm/src/metadata/di.js +10 -3
- package/esm/src/metadata/di.js.map +1 -1
- package/esm/src/metadata/directives.d.ts +104 -20
- package/esm/src/metadata/directives.js +25 -19
- package/esm/src/metadata/directives.js.map +1 -1
- package/esm/src/metadata/lifecycle_hooks.d.ts +46 -31
- package/esm/src/metadata/lifecycle_hooks.js +464 -10
- package/esm/src/metadata/lifecycle_hooks.js.map +1 -1
- package/esm/src/metadata/lifecycle_hooks.metadata.json +1 -1
- package/esm/src/metadata/view.d.ts +6 -2
- package/esm/src/metadata/view.js +3 -1
- package/esm/src/metadata/view.js.map +1 -1
- package/esm/src/metadata/view.metadata.json +1 -1
- package/esm/src/metadata.d.ts +49 -15
- package/esm/src/metadata.js +35 -10
- package/esm/src/metadata.js.map +1 -1
- package/esm/src/metadata.metadata.json +1 -1
- package/esm/src/platform_common_providers.d.ts +1 -0
- package/esm/src/platform_common_providers.js +3 -3
- package/esm/src/platform_common_providers.js.map +1 -1
- package/esm/src/platform_common_providers.metadata.json +1 -1
- package/esm/src/platform_directives_and_pipes.d.ts +48 -45
- package/esm/src/platform_directives_and_pipes.js +50 -47
- package/esm/src/platform_directives_and_pipes.js.map +1 -1
- package/esm/src/platform_directives_and_pipes.metadata.json +1 -1
- package/esm/src/profile/profile.d.ts +5 -1
- package/esm/src/profile/profile.js +4 -0
- package/esm/src/profile/profile.js.map +1 -1
- package/esm/src/profile/profile.metadata.json +1 -1
- package/esm/src/profile/wtf_impl.js +1 -1
- package/esm/src/profile/wtf_impl.js.map +1 -1
- package/esm/src/profile/wtf_impl.metadata.json +1 -0
- package/esm/src/profile/wtf_init.js +2 -2
- package/esm/src/profile/wtf_init.js.map +1 -1
- package/esm/src/reflection/platform_reflection_capabilities.d.ts +4 -3
- package/esm/src/reflection/platform_reflection_capabilities.js.map +1 -1
- package/esm/src/reflection/reflection.d.ts +1 -1
- package/esm/src/reflection/reflection.js +2 -2
- package/esm/src/reflection/reflection.js.map +1 -1
- package/esm/src/reflection/reflection.metadata.json +1 -1
- package/esm/src/reflection/reflection_capabilities.d.ts +4 -5
- package/esm/src/reflection/reflection_capabilities.js +22 -10
- package/esm/src/reflection/reflection_capabilities.js.map +1 -1
- package/esm/src/reflection/reflector.d.ts +8 -20
- package/esm/src/reflection/reflector.js +13 -3
- package/esm/src/reflection/reflector.js.map +1 -1
- package/esm/src/reflection/reflector_reader.js +3 -3
- package/esm/src/reflection/reflector_reader.js.map +1 -1
- package/esm/src/reflection/types.js.map +1 -1
- package/esm/src/render/api.d.ts +17 -6
- package/esm/src/render/api.js +8 -1
- package/esm/src/render/api.js.map +1 -1
- package/esm/src/render.d.ts +1 -1
- package/esm/src/render.js +1 -1
- package/esm/src/render.js.map +1 -1
- package/esm/src/security.js +6 -6
- package/esm/src/security.js.map +1 -1
- package/esm/src/testability/testability.d.ts +3 -19
- package/esm/src/testability/testability.js +10 -5
- package/esm/src/testability/testability.js.map +1 -1
- package/esm/src/testability/testability.metadata.json +1 -1
- package/esm/src/util/decorators.d.ts +2 -1
- package/esm/src/util/decorators.js +10 -9
- package/esm/src/util/decorators.js.map +1 -1
- package/esm/src/util.js.map +1 -1
- package/esm/src/zone/ng_zone.d.ts +6 -17
- package/esm/src/zone/ng_zone.js +7 -6
- package/esm/src/zone/ng_zone.js.map +1 -1
- package/esm/src/zone/ng_zone_impl.d.ts +1 -4
- package/esm/src/zone/ng_zone_impl.js +3 -2
- package/esm/src/zone/ng_zone_impl.js.map +1 -1
- package/esm/src/zone.js.map +1 -1
- package/esm/testing/async.js +20 -22
- package/esm/testing/async.js.map +1 -1
- package/esm/testing/async.metadata.json +1 -0
- package/esm/testing/async_test_completer.js.map +1 -1
- package/esm/testing/fake_async.d.ts +4 -1
- package/esm/testing/fake_async.js +9 -2
- package/esm/testing/fake_async.js.map +1 -1
- package/esm/testing/lang_utils.js +1 -1
- package/esm/testing/lang_utils.js.map +1 -1
- package/esm/testing/lang_utils.metadata.json +1 -0
- package/esm/testing/logger.js +5 -3
- package/esm/testing/logger.js.map +1 -1
- package/esm/testing/logger.metadata.json +1 -1
- package/esm/testing/mock_application_ref.d.ts +1 -1
- package/esm/testing/mock_application_ref.js +1 -0
- package/esm/testing/mock_application_ref.js.map +1 -1
- package/esm/testing/mock_application_ref.metadata.json +1 -1
- package/esm/testing/ng_zone_mock.d.ts +0 -1
- package/esm/testing/ng_zone_mock.js +2 -1
- package/esm/testing/ng_zone_mock.js.map +1 -1
- package/esm/testing/ng_zone_mock.metadata.json +1 -1
- package/esm/testing/regexp.js +1 -1
- package/esm/testing/regexp.js.map +1 -1
- package/esm/testing/regexp.metadata.json +1 -0
- package/esm/testing/test_injector.d.ts +6 -12
- package/esm/testing/test_injector.js +4 -10
- package/esm/testing/test_injector.js.map +1 -1
- package/esm/testing/test_injector.metadata.json +1 -0
- package/esm/testing/testing.d.ts +2 -2
- package/esm/testing/testing.js +2 -2
- package/esm/testing/testing.js.map +1 -1
- package/esm/testing/testing.metadata.json +1 -1
- package/esm/testing.js.map +1 -1
- package/index.d.ts +5 -4
- package/index.js +10 -8
- package/index.js.map +1 -1
- package/package.json +5 -1
- package/private_export.d.ts +96 -11
- package/private_export.js +39 -10
- package/private_export.js.map +1 -1
- package/private_export.metadata.json +1 -1
- package/src/animation/active_animation_players_map.d.ts +11 -0
- package/src/animation/active_animation_players_map.js +54 -0
- package/src/animation/active_animation_players_map.js.map +1 -0
- package/src/animation/animation_constants.d.ts +4 -0
- package/src/animation/animation_constants.js +6 -0
- package/src/animation/animation_constants.js.map +1 -0
- package/src/animation/animation_constants.metadata.json +1 -0
- package/src/animation/animation_driver.d.ts +9 -0
- package/src/animation/animation_driver.js +25 -0
- package/src/animation/animation_driver.js.map +1 -0
- package/src/animation/animation_group_player.d.ts +18 -0
- package/src/animation/animation_group_player.js +64 -0
- package/src/animation/animation_group_player.js.map +1 -0
- package/src/animation/animation_keyframe.d.ts +6 -0
- package/src/animation/animation_keyframe.js +10 -0
- package/src/animation/animation_keyframe.js.map +1 -0
- package/src/animation/animation_player.d.ts +26 -0
- package/src/animation/animation_player.js +42 -0
- package/src/animation/animation_player.js.map +1 -0
- package/src/animation/animation_sequence_player.d.ts +21 -0
- package/src/animation/animation_sequence_player.js +69 -0
- package/src/animation/animation_sequence_player.js.map +1 -0
- package/src/animation/animation_style_util.d.ts +32 -0
- package/src/animation/animation_style_util.js +99 -0
- package/src/animation/animation_style_util.js.map +1 -0
- package/src/animation/animation_style_util.metadata.json +1 -0
- package/src/animation/animation_styles.d.ts +8 -0
- package/src/animation/animation_styles.js +9 -0
- package/src/animation/animation_styles.js.map +1 -0
- package/src/animation/metadata.d.ts +511 -0
- package/src/animation/metadata.js +627 -0
- package/src/animation/metadata.js.map +1 -0
- package/src/animation/metadata.metadata.json +1 -0
- package/src/application_common_providers.d.ts +1 -0
- package/src/application_common_providers.js +4 -3
- package/src/application_common_providers.js.map +1 -1
- package/src/application_common_providers.metadata.json +1 -1
- package/src/application_ref.d.ts +17 -41
- package/src/application_ref.js +30 -21
- package/src/application_ref.js.map +1 -1
- package/src/application_ref.metadata.json +1 -1
- package/src/application_tokens.d.ts +6 -1
- package/src/application_tokens.js +9 -4
- package/src/application_tokens.js.map +1 -1
- package/src/application_tokens.metadata.json +1 -1
- package/src/change_detection/change_detection.d.ts +9 -8
- package/src/change_detection/change_detection.js +21 -21
- package/src/change_detection/change_detection.js.map +1 -1
- package/src/change_detection/change_detection.metadata.json +1 -1
- package/src/change_detection/change_detection_util.d.ts +3 -1
- package/src/change_detection/change_detection_util.js +6 -5
- package/src/change_detection/change_detection_util.js.map +1 -1
- package/src/change_detection/change_detection_util.metadata.json +1 -1
- package/src/change_detection/change_detector_ref.d.ts +3 -0
- package/src/change_detection/change_detector_ref.js +3 -0
- package/src/change_detection/change_detector_ref.js.map +1 -1
- package/src/change_detection/constants.d.ts +1 -0
- package/src/change_detection/constants.js +4 -3
- package/src/change_detection/constants.js.map +1 -1
- package/src/change_detection/constants.metadata.json +1 -1
- package/src/change_detection/differs/default_iterable_differ.d.ts +6 -94
- package/src/change_detection/differs/default_iterable_differ.js +25 -18
- package/src/change_detection/differs/default_iterable_differ.js.map +1 -1
- package/src/change_detection/differs/default_keyvalue_differ.d.ts +3 -30
- package/src/change_detection/differs/default_keyvalue_differ.js +13 -8
- package/src/change_detection/differs/default_keyvalue_differ.js.map +1 -1
- package/src/change_detection/differs/iterable_differs.d.ts +4 -1
- package/src/change_detection/differs/iterable_differs.js +4 -3
- package/src/change_detection/differs/iterable_differs.js.map +1 -1
- package/src/change_detection/differs/keyvalue_differs.d.ts +2 -1
- package/src/change_detection/differs/keyvalue_differs.js +4 -3
- package/src/change_detection/differs/keyvalue_differs.js.map +1 -1
- package/src/change_detection/pipe_transform.js.map +1 -1
- package/src/change_detection.d.ts +1 -1
- package/src/change_detection.js +9 -9
- package/src/change_detection.js.map +1 -1
- package/src/console.js +2 -1
- package/src/console.js.map +1 -1
- package/src/console.metadata.json +1 -1
- package/src/debug/debug_node.d.ts +20 -2
- package/src/debug/debug_node.js +16 -2
- package/src/debug/debug_node.js.map +1 -1
- package/src/debug/debug_node.metadata.json +1 -0
- package/src/debug/debug_renderer.d.ts +10 -6
- package/src/debug/debug_renderer.js +12 -1
- package/src/debug/debug_renderer.js.map +1 -1
- package/src/di/decorators.d.ts +13 -1
- package/src/di/decorators.js +7 -1
- package/src/di/decorators.js.map +1 -1
- package/src/di/decorators.metadata.json +1 -1
- package/src/di/forward_ref.d.ts +3 -1
- package/src/di/forward_ref.js +3 -1
- package/src/di/forward_ref.js.map +1 -1
- package/src/di/injector.d.ts +4 -1
- package/src/di/injector.js +5 -2
- package/src/di/injector.js.map +1 -1
- package/src/di/injector.metadata.json +1 -1
- package/src/di/metadata.d.ts +8 -1
- package/src/di/metadata.js +10 -3
- package/src/di/metadata.js.map +1 -1
- package/src/di/opaque_token.d.ts +2 -1
- package/src/di/opaque_token.js +22 -21
- package/src/di/opaque_token.js.map +1 -1
- package/src/di/provider.d.ts +11 -10
- package/src/di/provider.js +17 -14
- package/src/di/provider.js.map +1 -1
- package/src/di/provider.metadata.json +1 -0
- package/src/di/provider_util.js.map +1 -1
- package/src/di/provider_util.metadata.json +1 -0
- package/src/di/reflective_exceptions.d.ts +11 -16
- package/src/di/reflective_exceptions.js +28 -22
- package/src/di/reflective_exceptions.js.map +1 -1
- package/src/di/reflective_injector.d.ts +3 -33
- package/src/di/reflective_injector.js +9 -6
- package/src/di/reflective_injector.js.map +1 -1
- package/src/di/reflective_key.d.ts +1 -8
- package/src/di/reflective_key.js +3 -2
- package/src/di/reflective_key.js.map +1 -1
- package/src/di/reflective_provider.d.ts +2 -1
- package/src/di/reflective_provider.js +6 -5
- package/src/di/reflective_provider.js.map +1 -1
- package/src/di/reflective_provider.metadata.json +1 -0
- package/src/di.d.ts +2 -2
- package/src/di.js +7 -9
- package/src/di.js.map +1 -1
- package/src/facade/async.d.ts +11 -4
- package/src/facade/async.js +27 -17
- package/src/facade/async.js.map +1 -1
- package/src/facade/base_wrapped_exception.js +4 -4
- package/src/facade/base_wrapped_exception.js.map +1 -1
- package/src/facade/collection.js.map +1 -1
- package/src/facade/collection.metadata.json +1 -1
- package/src/facade/exception_handler.d.ts +2 -11
- package/src/facade/exception_handler.js +8 -7
- package/src/facade/exception_handler.js.map +1 -1
- package/src/facade/exceptions.d.ts +4 -0
- package/src/facade/exceptions.js +6 -2
- package/src/facade/exceptions.js.map +1 -1
- package/src/facade/exceptions.metadata.json +1 -0
- package/src/facade/lang.d.ts +6 -4
- package/src/facade/lang.js +12 -11
- package/src/facade/lang.js.map +1 -1
- package/src/facade/lang.metadata.json +1 -1
- package/src/facade/math.d.ts +2 -0
- package/src/facade/math.js +5 -0
- package/src/facade/math.js.map +1 -0
- package/src/facade/math.metadata.json +1 -0
- package/src/facade/promise.js.map +1 -1
- package/src/linker/component_factory.d.ts +5 -4
- package/src/linker/component_factory.js +7 -3
- package/src/linker/component_factory.js.map +1 -1
- package/src/linker/component_resolver.d.ts +5 -4
- package/src/linker/component_resolver.js +12 -7
- package/src/linker/component_resolver.js.map +1 -1
- package/src/linker/component_resolver.metadata.json +1 -1
- package/src/linker/debug_context.js +5 -4
- package/src/linker/debug_context.js.map +1 -1
- package/src/linker/dynamic_component_loader.d.ts +5 -6
- package/src/linker/dynamic_component_loader.js +5 -3
- package/src/linker/dynamic_component_loader.js.map +1 -1
- package/src/linker/dynamic_component_loader.metadata.json +1 -1
- package/src/linker/element.d.ts +3 -3
- package/src/linker/element.js +5 -5
- package/src/linker/element.js.map +1 -1
- package/src/linker/element_injector.js.map +1 -1
- package/src/linker/element_ref.d.ts +1 -0
- package/src/linker/element_ref.js +5 -5
- package/src/linker/element_ref.js.map +1 -1
- package/src/linker/exceptions.d.ts +4 -1
- package/src/linker/exceptions.js +4 -1
- package/src/linker/exceptions.js.map +1 -1
- package/src/linker/query_list.d.ts +3 -10
- package/src/linker/query_list.js +8 -7
- package/src/linker/query_list.js.map +1 -1
- package/src/linker/systemjs_component_resolver.d.ts +21 -0
- package/src/linker/systemjs_component_resolver.js +52 -0
- package/src/linker/systemjs_component_resolver.js.map +1 -0
- package/src/linker/template_ref.d.ts +2 -1
- package/src/linker/template_ref.js +1 -0
- package/src/linker/template_ref.js.map +1 -1
- package/src/linker/view.d.ts +12 -1
- package/src/linker/view.js +65 -15
- package/src/linker/view.js.map +1 -1
- package/src/linker/view_container_ref.d.ts +2 -10
- package/src/linker/view_container_ref.js +4 -3
- package/src/linker/view_container_ref.js.map +1 -1
- package/src/linker/view_ref.d.ts +5 -1
- package/src/linker/view_ref.js +6 -2
- package/src/linker/view_ref.js.map +1 -1
- package/src/linker/view_type.js.map +1 -1
- package/src/linker/view_utils.d.ts +2 -4
- package/src/linker/view_utils.js +21 -21
- package/src/linker/view_utils.js.map +1 -1
- package/src/linker/view_utils.metadata.json +1 -1
- package/src/linker.d.ts +5 -4
- package/src/linker.js +12 -9
- package/src/linker.js.map +1 -1
- package/src/metadata/di.d.ts +8 -1
- package/src/metadata/di.js +10 -3
- package/src/metadata/di.js.map +1 -1
- package/src/metadata/directives.d.ts +104 -20
- package/src/metadata/directives.js +25 -27
- package/src/metadata/directives.js.map +1 -1
- package/src/metadata/lifecycle_hooks.d.ts +46 -31
- package/src/metadata/lifecycle_hooks.js +496 -10
- package/src/metadata/lifecycle_hooks.js.map +1 -1
- package/src/metadata/lifecycle_hooks.metadata.json +1 -1
- package/src/metadata/view.d.ts +6 -2
- package/src/metadata/view.js +3 -1
- package/src/metadata/view.js.map +1 -1
- package/src/metadata/view.metadata.json +1 -1
- package/src/metadata.d.ts +49 -15
- package/src/metadata.js +70 -37
- package/src/metadata.js.map +1 -1
- package/src/metadata.metadata.json +1 -1
- package/src/platform_common_providers.d.ts +1 -0
- package/src/platform_common_providers.js +3 -3
- package/src/platform_common_providers.js.map +1 -1
- package/src/platform_common_providers.metadata.json +1 -1
- package/src/platform_directives_and_pipes.d.ts +48 -45
- package/src/platform_directives_and_pipes.js +50 -47
- package/src/platform_directives_and_pipes.js.map +1 -1
- package/src/platform_directives_and_pipes.metadata.json +1 -1
- package/src/profile/profile.d.ts +5 -1
- package/src/profile/profile.js +5 -3
- package/src/profile/profile.js.map +1 -1
- package/src/profile/profile.metadata.json +1 -1
- package/src/profile/wtf_impl.js +1 -1
- package/src/profile/wtf_impl.js.map +1 -1
- package/src/profile/wtf_impl.metadata.json +1 -0
- package/src/profile/wtf_init.js +2 -2
- package/src/profile/wtf_init.js.map +1 -1
- package/src/reflection/platform_reflection_capabilities.d.ts +4 -3
- package/src/reflection/platform_reflection_capabilities.js.map +1 -1
- package/src/reflection/reflection.d.ts +1 -1
- package/src/reflection/reflection.js +2 -2
- package/src/reflection/reflection.js.map +1 -1
- package/src/reflection/reflection.metadata.json +1 -1
- package/src/reflection/reflection_capabilities.d.ts +4 -5
- package/src/reflection/reflection_capabilities.js +24 -10
- package/src/reflection/reflection_capabilities.js.map +1 -1
- package/src/reflection/reflector.d.ts +8 -20
- package/src/reflection/reflector.js +13 -3
- package/src/reflection/reflector.js.map +1 -1
- package/src/reflection/reflector_reader.js +3 -3
- package/src/reflection/reflector_reader.js.map +1 -1
- package/src/reflection/types.js.map +1 -1
- package/src/render/api.d.ts +17 -6
- package/src/render/api.js +8 -1
- package/src/render/api.js.map +1 -1
- package/src/render.d.ts +1 -1
- package/src/render.js +2 -2
- package/src/render.js.map +1 -1
- package/src/security.js +6 -6
- package/src/security.js.map +1 -1
- package/src/testability/testability.d.ts +3 -19
- package/src/testability/testability.js +10 -5
- package/src/testability/testability.js.map +1 -1
- package/src/testability/testability.metadata.json +1 -1
- package/src/util/decorators.d.ts +2 -1
- package/src/util/decorators.js +10 -9
- package/src/util/decorators.js.map +1 -1
- package/src/util.js.map +1 -1
- package/src/zone/ng_zone.d.ts +6 -17
- package/src/zone/ng_zone.js +11 -6
- package/src/zone/ng_zone.js.map +1 -1
- package/src/zone/ng_zone_impl.d.ts +1 -4
- package/src/zone/ng_zone_impl.js +3 -2
- package/src/zone/ng_zone_impl.js.map +1 -1
- package/src/zone.js.map +1 -1
- package/testing/async.js +20 -22
- package/testing/async.js.map +1 -1
- package/testing/async.metadata.json +1 -0
- package/testing/async_test_completer.js.map +1 -1
- package/testing/fake_async.d.ts +4 -1
- package/testing/fake_async.js +10 -2
- package/testing/fake_async.js.map +1 -1
- package/testing/lang_utils.js +1 -1
- package/testing/lang_utils.js.map +1 -1
- package/testing/lang_utils.metadata.json +1 -0
- package/testing/logger.js +5 -3
- package/testing/logger.js.map +1 -1
- package/testing/logger.metadata.json +1 -1
- package/testing/mock_application_ref.d.ts +1 -1
- package/testing/mock_application_ref.js +1 -0
- package/testing/mock_application_ref.js.map +1 -1
- package/testing/mock_application_ref.metadata.json +1 -1
- package/testing/ng_zone_mock.d.ts +0 -1
- package/testing/ng_zone_mock.js +2 -1
- package/testing/ng_zone_mock.js.map +1 -1
- package/testing/ng_zone_mock.metadata.json +1 -1
- package/testing/regexp.js +1 -1
- package/testing/regexp.js.map +1 -1
- package/testing/regexp.metadata.json +1 -0
- package/testing/test_injector.d.ts +6 -12
- package/testing/test_injector.js +3 -9
- package/testing/test_injector.js.map +1 -1
- package/testing/test_injector.metadata.json +1 -0
- package/testing/testing.d.ts +2 -2
- package/testing/testing.js +5 -5
- package/testing/testing.js.map +1 -1
- package/testing/testing.metadata.json +1 -1
- package/testing.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/render/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/render/api.ts"],"names":[],"mappings":"OAIO,EAAC,aAAa,EAAC,MAAM,sBAAsB;AAIlD;;GAEG;AACH;IACE,YACW,EAAU,EAAS,WAAmB,EAAS,SAAiB,EAChE,aAAgC,EAAS,MAA2B;QADpE,OAAE,GAAF,EAAE,CAAQ;QAAS,gBAAW,GAAX,WAAW,CAAQ;QAAS,cAAS,GAAT,SAAS,CAAQ;QAChE,kBAAa,GAAb,aAAa,CAAmB;QAAS,WAAM,GAAN,MAAM,CAAqB;IAAG,CAAC;AACrF,CAAC;AAED;IACE,IAAI,QAAQ,KAAe,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IACpD,IAAI,SAAS,KAAU,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IAChD,IAAI,cAAc,KAAY,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IACvD,IAAI,UAAU,KAA2B,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IAClE,IAAI,OAAO,KAAU,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;IAC9C,IAAI,MAAM,KAAa,MAAM,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH;AAgDA,CAAC;AAED;;;;;;;;;;;;GAYG;AACH;AAEA,CAAC;AAAA","sourcesContent":["import {AnimationKeyframe} from '../../src/animation/animation_keyframe';\nimport {AnimationPlayer} from '../../src/animation/animation_player';\nimport {AnimationStyles} from '../../src/animation/animation_styles';\nimport {Injector} from '../di/injector';\nimport {unimplemented} from '../facade/exceptions';\nimport {ViewEncapsulation} from '../metadata/view';\n\n\n/**\n * @experimental\n */\nexport class RenderComponentType {\n constructor(\n public id: string, public templateUrl: string, public slotCount: number,\n public encapsulation: ViewEncapsulation, public styles: Array<string|any[]>) {}\n}\n\nexport abstract class RenderDebugInfo {\n get injector(): Injector { return unimplemented(); }\n get component(): any { return unimplemented(); }\n get providerTokens(): any[] { return unimplemented(); }\n get references(): {[key: string]: any} { return unimplemented(); }\n get context(): any { return unimplemented(); }\n get source(): string { return unimplemented(); }\n}\n\n/**\n * @experimental\n */\nexport abstract class Renderer {\n abstract selectRootElement(selectorOrNode: string|any, debugInfo?: RenderDebugInfo): any;\n\n abstract createElement(parentElement: any, name: string, debugInfo?: RenderDebugInfo): any;\n\n abstract createViewRoot(hostElement: any): any;\n\n abstract createTemplateAnchor(parentElement: any, debugInfo?: RenderDebugInfo): any;\n\n abstract createText(parentElement: any, value: string, debugInfo?: RenderDebugInfo): any;\n\n abstract projectNodes(parentElement: any, nodes: any[]): void;\n\n abstract attachViewAfter(node: any, viewRootNodes: any[]): void;\n\n abstract detachView(viewRootNodes: any[]): void;\n\n abstract destroyView(hostElement: any, viewAllNodes: any[]): void;\n\n abstract listen(renderElement: any, name: string, callback: Function): Function;\n\n abstract listenGlobal(target: string, name: string, callback: Function): Function;\n\n abstract setElementProperty(renderElement: any, propertyName: string, propertyValue: any): void;\n\n abstract setElementAttribute(renderElement: any, attributeName: string, attributeValue: string):\n void;\n\n /**\n * Used only in debug mode to serialize property changes to dom nodes as attributes.\n */\n abstract setBindingDebugInfo(renderElement: any, propertyName: string, propertyValue: string):\n void;\n\n abstract setElementClass(renderElement: any, className: string, isAdd: boolean): any\n /** TODO #9100 */;\n\n abstract setElementStyle(renderElement: any, styleName: string, styleValue: string): any\n /** TODO #9100 */;\n\n abstract invokeElementMethod(renderElement: any, methodName: string, args?: any[]): any\n /** TODO #9100 */;\n\n abstract setText(renderNode: any, text: string): any /** TODO #9100 */;\n\n abstract animate(\n element: any, startingStyles: AnimationStyles, keyframes: AnimationKeyframe[],\n duration: number, delay: number, easing: string): AnimationPlayer;\n}\n\n/**\n * Injectable service that provides a low-level interface for modifying the UI.\n *\n * Use this service to bypass Angular's templating and make custom UI changes that can't be\n * expressed declaratively. For example if you need to set a property or an attribute whose name is\n * not statically known, use {@link #setElementProperty} or {@link #setElementAttribute}\n * respectively.\n *\n * If you are implementing a custom renderer, you must implement this interface.\n *\n * The default Renderer implementation is `DomRenderer`. Also available is `WebWorkerRenderer`.\n * @experimental\n */\nexport abstract class RootRenderer {\n abstract renderComponent(componentType: RenderComponentType): Renderer;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/esm/src/render.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { RenderComponentType, Renderer, RootRenderer } from './render/api';
|
package/esm/src/render.js
CHANGED
package/esm/src/render.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/render.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/render.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,SAAQ,mBAAmB,EAAE,QAAQ,EAAE,YAAY,QAAO,cAAc,CAAC","sourcesContent":["// Public API for render\nexport {RenderComponentType, Renderer, RootRenderer} from './render/api';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/esm/src/security.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
|
|
3
|
-
* like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
|
|
4
|
-
* handled.
|
|
5
|
-
*
|
|
6
|
-
* See DomSanitizationService for more details on security in Angular applications.
|
|
7
|
-
*/
|
|
2
|
+
* A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property
|
|
3
|
+
* like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly
|
|
4
|
+
* handled.
|
|
5
|
+
*
|
|
6
|
+
* See DomSanitizationService for more details on security in Angular applications.
|
|
7
|
+
*/
|
|
8
8
|
export var SecurityContext;
|
|
9
9
|
(function (SecurityContext) {
|
|
10
10
|
SecurityContext[SecurityContext["NONE"] = 0] = "NONE";
|
package/esm/src/security.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/security.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"security.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/security.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,WAAY,eAOX;AAPD,WAAY,eAAe;IACzB,qDAAI,CAAA;IACJ,qDAAI,CAAA;IACJ,uDAAK,CAAA;IACL,yDAAM,CAAA;IACN,mDAAG,CAAA;IACH,qEAAY,CAAA;AACd,CAAC,EAPW,eAAe,KAAf,eAAe,QAO1B;AAED;;;GAGG;AACH;AAEA,CAAC;AAAA","sourcesContent":["/**\n * A SecurityContext marks a location that has dangerous security implications, e.g. a DOM property\n * like `innerHTML` that could cause Cross Site Scripting (XSS) security bugs when improperly\n * handled.\n *\n * See DomSanitizationService for more details on security in Angular applications.\n */\nexport enum SecurityContext {\n NONE,\n HTML,\n STYLE,\n SCRIPT,\n URL,\n RESOURCE_URL,\n}\n\n/**\n * SanitizationService is used by the views to sanitize potentially dangerous values. This is a\n * private API, use code should only refer to DomSanitizationService.\n */\nexport abstract class SanitizationService {\n abstract sanitize(context: SecurityContext, value: string): string;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -3,30 +3,14 @@ import { NgZone } from '../zone/ng_zone';
|
|
|
3
3
|
* The Testability service provides testing hooks that can be accessed from
|
|
4
4
|
* the browser and by services such as Protractor. Each bootstrapped Angular
|
|
5
5
|
* application on the page will have an instance of Testability.
|
|
6
|
+
* @experimental
|
|
6
7
|
*/
|
|
7
8
|
export declare class Testability {
|
|
8
9
|
private _ngZone;
|
|
9
|
-
/** @internal */
|
|
10
|
-
_pendingCount: number;
|
|
11
|
-
/** @internal */
|
|
12
|
-
_isZoneStable: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Whether any work was done since the last 'whenStable' callback. This is
|
|
15
|
-
* useful to detect if this could have potentially destabilized another
|
|
16
|
-
* component while it is stabilizing.
|
|
17
|
-
* @internal
|
|
18
|
-
*/
|
|
19
|
-
_didWork: boolean;
|
|
20
|
-
/** @internal */
|
|
21
|
-
_callbacks: Function[];
|
|
22
10
|
constructor(_ngZone: NgZone);
|
|
23
|
-
/** @internal */
|
|
24
|
-
_watchAngularEvents(): void;
|
|
25
11
|
increasePendingRequestCount(): number;
|
|
26
12
|
decreasePendingRequestCount(): number;
|
|
27
13
|
isStable(): boolean;
|
|
28
|
-
/** @internal */
|
|
29
|
-
_runCallbacksIfReady(): void;
|
|
30
14
|
whenStable(callback: Function): void;
|
|
31
15
|
getPendingRequestCount(): number;
|
|
32
16
|
findBindings(using: any, provider: string, exactMatch: boolean): any[];
|
|
@@ -34,10 +18,9 @@ export declare class Testability {
|
|
|
34
18
|
}
|
|
35
19
|
/**
|
|
36
20
|
* A global registry of {@link Testability} instances for specific elements.
|
|
21
|
+
* @experimental
|
|
37
22
|
*/
|
|
38
23
|
export declare class TestabilityRegistry {
|
|
39
|
-
/** @internal */
|
|
40
|
-
_applications: Map<any, Testability>;
|
|
41
24
|
constructor();
|
|
42
25
|
registerApplication(token: any, testability: Testability): void;
|
|
43
26
|
getTestability(elem: any): Testability;
|
|
@@ -55,5 +38,6 @@ export interface GetTestability {
|
|
|
55
38
|
}
|
|
56
39
|
/**
|
|
57
40
|
* Set the {@link GetTestability} implementation used by the Angular testing framework.
|
|
41
|
+
* @experimental
|
|
58
42
|
*/
|
|
59
43
|
export declare function setTestabilityGetter(getter: GetTestability): void;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { Map, MapWrapper } from '../../src/facade/collection';
|
|
2
|
-
import { scheduleMicroTask } from '../../src/facade/lang';
|
|
3
|
-
import { BaseException } from '../../src/facade/exceptions';
|
|
4
|
-
import { NgZone } from '../zone/ng_zone';
|
|
5
|
-
import { ObservableWrapper } from '../../src/facade/async';
|
|
6
1
|
import { Injectable } from '../di/decorators';
|
|
2
|
+
import { ObservableWrapper } from '../facade/async';
|
|
3
|
+
import { Map, MapWrapper } from '../facade/collection';
|
|
4
|
+
import { BaseException } from '../facade/exceptions';
|
|
5
|
+
import { scheduleMicroTask } from '../facade/lang';
|
|
6
|
+
import { NgZone } from '../zone/ng_zone';
|
|
7
7
|
export class Testability {
|
|
8
8
|
constructor(_ngZone) {
|
|
9
9
|
this._ngZone = _ngZone;
|
|
@@ -84,9 +84,11 @@ export class Testability {
|
|
|
84
84
|
return [];
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
+
/** @nocollapse */
|
|
87
88
|
Testability.decorators = [
|
|
88
89
|
{ type: Injectable },
|
|
89
90
|
];
|
|
91
|
+
/** @nocollapse */
|
|
90
92
|
Testability.ctorParameters = [
|
|
91
93
|
{ type: NgZone, },
|
|
92
94
|
];
|
|
@@ -106,9 +108,11 @@ export class TestabilityRegistry {
|
|
|
106
108
|
return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);
|
|
107
109
|
}
|
|
108
110
|
}
|
|
111
|
+
/** @nocollapse */
|
|
109
112
|
TestabilityRegistry.decorators = [
|
|
110
113
|
{ type: Injectable },
|
|
111
114
|
];
|
|
115
|
+
/** @nocollapse */
|
|
112
116
|
TestabilityRegistry.ctorParameters = [];
|
|
113
117
|
/* @ts2dart_const */
|
|
114
118
|
class _NoopGetTestability {
|
|
@@ -119,6 +123,7 @@ class _NoopGetTestability {
|
|
|
119
123
|
}
|
|
120
124
|
/**
|
|
121
125
|
* Set the {@link GetTestability} implementation used by the Angular testing framework.
|
|
126
|
+
* @experimental
|
|
122
127
|
*/
|
|
123
128
|
export function setTestabilityGetter(getter) {
|
|
124
129
|
_testabilityGetter = getter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testability.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/testability/testability.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"testability.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/testability/testability.ts"],"names":[],"mappings":"OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB;OACpC,EAAC,iBAAiB,EAAC,MAAM,iBAAiB;OAC1C,EAAC,GAAG,EAAE,UAAU,EAAC,MAAM,sBAAsB;OAC7C,EAAC,aAAa,EAAC,MAAM,sBAAsB;OAC3C,EAAC,iBAAiB,EAAC,MAAM,gBAAgB;OACzC,EAAC,MAAM,EAAC,MAAM,iBAAiB;AACtC;IAcE,YAAoB,OAAe;QAAf,YAAO,GAAP,OAAO,CAAQ;QAbnC,gBAAgB;QAChB,kBAAa,GAAW,CAAC,CAAC;QAC1B,gBAAgB;QAChB,kBAAa,GAAY,IAAI,CAAC;QAC9B;;;;;WAKG;QACH,aAAQ,GAAY,KAAK,CAAC;QAC1B,gBAAgB;QAChB,eAAU,GAAe,EAAE,CAAC;QACW,IAAI,CAAC,mBAAmB,EAAE,CAAC;IAAC,CAAC;IAEpE,gBAAgB;IAChB,mBA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;IAC7C,CAAC;IAED,cAAc,CAAC,IAAS,IAAiB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAE/E,mBAAmB,KAAoB,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAEtF,kBAAkB,KAAY,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IAE3E,qBAAqB,CAAC,IAAU,EAAE,eAAe,GAAY,IAAI;QAC/D,MAAM,CAAC,kBAAkB,CAAC,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,CAAC,CAAC;IAC/E,CAAC;AAQH,CAAC;AAPD,kBAAkB;AACX,8BAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;CACnB,CAAC;AACF,kBAAkB;AACX,kCAAc,GAA2D,EAC/E,CACA;AAYD,oBAAoB;AACpB;IACE,WAAW,CAAC,QAA6B,IAAS,CAAC;IACnD,qBAAqB,CAAC,QAA6B,EAAE,IAAS,EAAE,eAAwB;QAEtF,MAAM,CAAC,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,qCAAqC,MAAsB;IACzD,kBAAkB,GAAG,MAAM,CAAC;AAC9B,CAAC;AAED,IAAI,kBAAkB,GAAsC,IAAI,mBAAmB,EAAE,CAAC","sourcesContent":["import {Injectable} from '../di/decorators';\nimport {ObservableWrapper} from '../facade/async';\nimport {Map, MapWrapper} from '../facade/collection';\nimport {BaseException} from '../facade/exceptions';\nimport {scheduleMicroTask} from '../facade/lang';\nimport {NgZone} from '../zone/ng_zone';\nexport class Testability {\n /** @internal */\n _pendingCount: number = 0;\n /** @internal */\n _isZoneStable: boolean = true;\n /**\n * Whether any work was done since the last 'whenStable' callback. This is\n * useful to detect if this could have potentially destabilized another\n * component while it is stabilizing.\n * @internal\n */\n _didWork: boolean = false;\n /** @internal */\n _callbacks: Function[] = [];\n constructor(private _ngZone: NgZone) { this._watchAngularEvents(); }\n\n /** @internal */\n _watchAngularEvents(): void {\n ObservableWrapper.subscribe(this._ngZone.onUnstable, (_) => {\n this._didWork = true;\n this._isZoneStable = false;\n });\n\n this._ngZone.runOutsideAngular(() => {\n ObservableWrapper.subscribe(this._ngZone.onStable, (_) => {\n NgZone.assertNotInAngularZone();\n scheduleMicroTask(() => {\n this._isZoneStable = true;\n this._runCallbacksIfReady();\n });\n });\n });\n }\n\n increasePendingRequestCount(): number {\n this._pendingCount += 1;\n this._didWork = true;\n return this._pendingCount;\n }\n\n decreasePendingRequestCount(): number {\n this._pendingCount -= 1;\n if (this._pendingCount < 0) {\n throw new BaseException('pending async requests below zero');\n }\n this._runCallbacksIfReady();\n return this._pendingCount;\n }\n\n isStable(): boolean {\n return this._isZoneStable && this._pendingCount == 0 && !this._ngZone.hasPendingMacrotasks;\n }\n\n /** @internal */\n _runCallbacksIfReady(): void {\n if (this.isStable()) {\n // Schedules the call backs in a new frame so that it is always async.\n scheduleMicroTask(() => {\n while (this._callbacks.length !== 0) {\n (this._callbacks.pop())(this._didWork);\n }\n this._didWork = false;\n });\n } else {\n // Not Ready\n this._didWork = true;\n }\n }\n\n whenStable(callback: Function): void {\n this._callbacks.push(callback);\n this._runCallbacksIfReady();\n }\n\n getPendingRequestCount(): number { return this._pendingCount; }\n\n findBindings(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n\n findProviders(using: any, provider: string, exactMatch: boolean): any[] {\n // TODO(juliemr): implement.\n return [];\n }\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [\n{type: NgZone, },\n];\n}\nexport class TestabilityRegistry {\n /** @internal */\n _applications = new Map<any, Testability>();\n\n constructor() { _testabilityGetter.addToWindow(this); }\n\n registerApplication(token: any, testability: Testability) {\n this._applications.set(token, testability);\n }\n\n getTestability(elem: any): Testability { return this._applications.get(elem); }\n\n getAllTestabilities(): Testability[] { return MapWrapper.values(this._applications); }\n\n getAllRootElements(): any[] { return MapWrapper.keys(this._applications); }\n\n findTestabilityInTree(elem: Node, findInAncestors: boolean = true): Testability {\n return _testabilityGetter.findTestabilityInTree(this, elem, findInAncestors);\n }\n/** @nocollapse */\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: {type: Function, decorators?: DecoratorInvocation[]}[] = [\n];\n}\n\n/**\n * Adapter interface for retrieving the `Testability` service associated for a\n * particular context.\n */\nexport interface GetTestability {\n addToWindow(registry: TestabilityRegistry): void;\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability;\n}\n\n/* @ts2dart_const */\nclass _NoopGetTestability implements GetTestability {\n addToWindow(registry: TestabilityRegistry): void {}\n findTestabilityInTree(registry: TestabilityRegistry, elem: any, findInAncestors: boolean):\n Testability {\n return null;\n }\n}\n\n/**\n * Set the {@link GetTestability} implementation used by the Angular testing framework.\n * @experimental\n */\nexport function setTestabilityGetter(getter: GetTestability): void {\n _testabilityGetter = getter;\n}\n\nvar _testabilityGetter: GetTestability = /*@ts2dart_const*/ new _NoopGetTestability();\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"__symbolic":"module","metadata":{"Testability":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","
|
|
1
|
+
{"__symbolic":"module","version":1,"metadata":{"Testability":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di/decorators","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"../zone/ng_zone","name":"NgZone"}]}],"_watchAngularEvents":[{"__symbolic":"method"}],"increasePendingRequestCount":[{"__symbolic":"method"}],"decreasePendingRequestCount":[{"__symbolic":"method"}],"isStable":[{"__symbolic":"method"}],"_runCallbacksIfReady":[{"__symbolic":"method"}],"whenStable":[{"__symbolic":"method"}],"getPendingRequestCount":[{"__symbolic":"method"}],"findBindings":[{"__symbolic":"method"}],"findProviders":[{"__symbolic":"method"}]}},"TestabilityRegistry":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"../di/decorators","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor"}],"registerApplication":[{"__symbolic":"method"}],"getTestability":[{"__symbolic":"method"}],"getAllTestabilities":[{"__symbolic":"method"}],"getAllRootElements":[{"__symbolic":"method"}],"findTestabilityInTree":[{"__symbolic":"method"}]}}}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConcreteType, Type } from '
|
|
1
|
+
import { ConcreteType, Type } from '../facade/lang';
|
|
2
2
|
/**
|
|
3
3
|
* Declares the interface to be used with {@link Class}.
|
|
4
4
|
*/
|
|
@@ -142,6 +142,7 @@ export interface TypeDecorator {
|
|
|
142
142
|
* }
|
|
143
143
|
* });
|
|
144
144
|
* ```
|
|
145
|
+
* @stable
|
|
145
146
|
*/
|
|
146
147
|
export declare function Class(clsDef: ClassDefinition): ConcreteType;
|
|
147
148
|
export declare function makeDecorator(annotationCls: any, chainFn?: (fn: Function) => void): (...args: any[]) => (cls: any) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { global, isFunction, stringify } from '
|
|
1
|
+
import { global, isFunction, stringify } from '../facade/lang';
|
|
2
2
|
var _nextClassId = 0;
|
|
3
3
|
function extractAnnotation(annotation) {
|
|
4
4
|
if (isFunction(annotation) && annotation.hasOwnProperty('annotation')) {
|
|
@@ -129,6 +129,7 @@ function applyParams(fnOrArray, key) {
|
|
|
129
129
|
* }
|
|
130
130
|
* });
|
|
131
131
|
* ```
|
|
132
|
+
* @stable
|
|
132
133
|
*/
|
|
133
134
|
export function Class(clsDef) {
|
|
134
135
|
var constructor = applyParams(clsDef.hasOwnProperty('constructor') ? clsDef.constructor : undefined, 'constructor');
|
|
@@ -163,8 +164,8 @@ var Reflect = global.Reflect;
|
|
|
163
164
|
throw 'reflect-metadata shim is required when using class decorators';
|
|
164
165
|
}
|
|
165
166
|
})();
|
|
166
|
-
export function makeDecorator(annotationCls
|
|
167
|
-
function DecoratorFactory(objOrType) {
|
|
167
|
+
export function makeDecorator(annotationCls /* TODO #9100 */, chainFn = null) {
|
|
168
|
+
function DecoratorFactory(objOrType /** TODO #9100 */) {
|
|
168
169
|
var annotationInstance = new annotationCls(objOrType);
|
|
169
170
|
if (this instanceof annotationCls) {
|
|
170
171
|
return annotationInstance;
|
|
@@ -172,7 +173,7 @@ export function makeDecorator(annotationCls, chainFn = null) {
|
|
|
172
173
|
else {
|
|
173
174
|
var chainAnnotation = isFunction(this) && this.annotations instanceof Array ? this.annotations : [];
|
|
174
175
|
chainAnnotation.push(annotationInstance);
|
|
175
|
-
var TypeDecorator = function TypeDecorator(cls) {
|
|
176
|
+
var TypeDecorator = function TypeDecorator(cls /** TODO #9100 */) {
|
|
176
177
|
var annotations = Reflect.getOwnMetadata('annotations', cls);
|
|
177
178
|
annotations = annotations || [];
|
|
178
179
|
annotations.push(annotationInstance);
|
|
@@ -190,8 +191,8 @@ export function makeDecorator(annotationCls, chainFn = null) {
|
|
|
190
191
|
DecoratorFactory.annotationCls = annotationCls;
|
|
191
192
|
return DecoratorFactory;
|
|
192
193
|
}
|
|
193
|
-
export function makeParamDecorator(annotationCls) {
|
|
194
|
-
function ParamDecoratorFactory(...args) {
|
|
194
|
+
export function makeParamDecorator(annotationCls /** TODO #9100 */) {
|
|
195
|
+
function ParamDecoratorFactory(...args /** TODO #9100 */) {
|
|
195
196
|
var annotationInstance = Object.create(annotationCls.prototype);
|
|
196
197
|
annotationCls.apply(annotationInstance, args);
|
|
197
198
|
if (this instanceof annotationCls) {
|
|
@@ -201,7 +202,7 @@ export function makeParamDecorator(annotationCls) {
|
|
|
201
202
|
ParamDecorator.annotation = annotationInstance;
|
|
202
203
|
return ParamDecorator;
|
|
203
204
|
}
|
|
204
|
-
function ParamDecorator(cls
|
|
205
|
+
function ParamDecorator(cls /** TODO #9100 */, unusedKey /** TODO #9100 */, index /** TODO #9100 */) {
|
|
205
206
|
var parameters = Reflect.getMetadata('parameters', cls);
|
|
206
207
|
parameters = parameters || [];
|
|
207
208
|
// there might be gaps if some in between parameters do not have annotations.
|
|
@@ -220,8 +221,8 @@ export function makeParamDecorator(annotationCls) {
|
|
|
220
221
|
ParamDecoratorFactory.annotationCls = annotationCls;
|
|
221
222
|
return ParamDecoratorFactory;
|
|
222
223
|
}
|
|
223
|
-
export function makePropDecorator(annotationCls) {
|
|
224
|
-
function PropDecoratorFactory(...args) {
|
|
224
|
+
export function makePropDecorator(annotationCls /** TODO #9100 */) {
|
|
225
|
+
function PropDecoratorFactory(...args /** TODO #9100 */) {
|
|
225
226
|
var decoratorInstance = Object.create(annotationCls.prototype);
|
|
226
227
|
annotationCls.apply(decoratorInstance, args);
|
|
227
228
|
if (this instanceof annotationCls) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/util/decorators.ts"],"names":[],"mappings":"OAIS,EAAe,MAAM,EAAQ,UAAU,EAAE,SAAS,EAAC,MAAM,uBAAuB;AAEzF,IAAI,YAAY,GAAG,CAAC,CAAC;AA4ErB,2BAA2B,UAAe;IACxC,EAAE,CAAC,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACtE,wCAAwC;QACxC,UAAU,GAAG,UAAU,CAAC,UAAU,CAAC;IACrC,CAAC;IACD,MAAM,CAAC,UAAU,CAAC;AACpB,CAAC;AAED,qBAAqB,SAA6B,EAAE,GAAW;IAC7D,EAAE,CAAC,CAAC,SAAS,KAAK,MAAM,IAA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;QACnC,IAAI,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC/D,aAAa,CAAC,KAAK,CAAC,iBAAiB,EAAE,IAAI,CAAC,CAAC;QAE7C,EAAE,CAAC,CAAC,IAAI,YAAY,aAAa,CAAC,CAAC,CAAC;YAClC,MAAM,CAAC,iBAAiB,CAAC;QAC3B,CAAC;QAAC,IAAI,CAAC,CAAC;YACN,MAAM,CAAC,uBAAuB,MAAW,EAAE,IAAY;gBACrD,IAAI,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC,cAAc,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;gBACtE,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;gBAClB,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;gBAC9B,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;gBACtC,OAAO,CAAC,cAAc,CAAC,cAAc,EAAE,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;YACnE,CAAC,CAAC;QACJ,CAAC;IACH,CAAC;IACD,oBAAoB,CAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAClE,oBAAqB,CAAC,aAAa,GAAG,aAAa,CAAC;IAC1D,MAAM,CAAC,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {ConcreteType, global, Type, isFunction, stringify} from '../../src/facade/lang';\n\nvar _nextClassId = 0;\n\n/**\n * Declares the interface to be used with {@link Class}.\n */\nexport interface ClassDefinition {\n /**\n * Optional argument for specifying the superclass.\n */\n extends?: Type;\n\n /**\n * Required constructor function for a class.\n *\n * The function may be optionally wrapped in an `Array`, in which case additional parameter\n * annotations may be specified.\n * The number of arguments and the number of parameter annotations must match.\n *\n * See {@link Class} for example of usage.\n */\n constructor: Function | any[];\n\n /**\n * Other methods on the class. Note that values should have type 'Function' but TS requires\n * all properties to have a narrower type than the index signature.\n */\n [x: string]: Type | Function | any[];\n}\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as ES7\n * decorators as well as\n * Angular DSL syntax.\n *\n * DSL syntax:\n *\n * ```\n * var MyClass = ng\n * .Component({...})\n * .View({...})\n * .Class({...});\n * ```\n *\n * ES7 syntax:\n *\n * ```\n * @ng.Component({...})\n * @ng.View({...})\n * class MyClass {...}\n * ```\n */\nexport interface TypeDecorator {\n /**\n * Invoke as ES7 decorator.\n */\n <T extends Type>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string | symbol, parameterIndex?: number): void;\n\n /**\n * Storage for the accumulated annotations so far used by the DSL syntax.\n *\n * Used by {@link Class} to annotate the generated class.\n */\n annotations: any[];\n\n /**\n * Generate a class from the definition and annotate it with {@link TypeDecorator#annotations}.\n */\n Class(obj: ClassDefinition): ConcreteType;\n}\n\nfunction extractAnnotation(annotation: any): any {\n if (isFunction(annotation) && annotation.hasOwnProperty('annotation')) {\n // it is a decorator, extract annotation\n annotation = annotation.annotation;\n }\n return annotation;\n}\n\nfunction applyParams(fnOrArray: (Function | any[]), key: string): Function {\n if (fnOrArray === Object || fnOrArray === String || fnOrArray === Function ||\n fnOrArray === Number || fnOrArray === Array) {\n throw new Error(`Can not use native ${stringify(fnOrArray)} as constructor`);\n }\n if (isFunction(fnOrArray)) {\n return <Function>fnOrArray;\n } else if (fnOrArray instanceof Array) {\n var annotations: any[] = fnOrArray;\n var fn: Function = fnOrArray[fnOrArray.length - 1];\n if (!isFunction(fn)) {\n throw new Error(\n `Last position of Class method array must be Function in key ${key} was '${stringify(fn)}'`);\n }\n var annoLength = annotations.length - 1;\n if (annoLength != fn.length) {\n throw new Error(\n `Number of annotations (${annoLength}) does not match number of arguments (${fn.length}) in the function: ${stringify(fn)}`);\n }\n var paramsAnnotations: any[][] = [];\n for (var i = 0, ii = annotations.length - 1; i < ii; i++) {\n var paramAnnotations: any[] = [];\n paramsAnnotations.push(paramAnnotations);\n var annotation = annotations[i];\n if (annotation instanceof Array) {\n for (var j = 0; j < annotation.length; j++) {\n paramAnnotations.push(extractAnnotation(annotation[j]));\n }\n } else if (isFunction(annotation)) {\n paramAnnotations.push(extractAnnotation(annotation));\n } else {\n paramAnnotations.push(annotation);\n }\n }\n Reflect.defineMetadata('parameters', paramsAnnotations, fn);\n return fn;\n } else {\n throw new Error(\n `Only Function or Array is supported in Class definition for key '${key}' is '${stringify(fnOrArray)}'`);\n }\n}\n\n/**\n * Provides a way for expressing ES6 classes with parameter annotations in ES5.\n *\n * ## Basic Example\n *\n * ```\n * var Greeter = ng.Class({\n * constructor: function(name) {\n * this.name = name;\n * },\n *\n * greet: function() {\n * alert('Hello ' + this.name + '!');\n * }\n * });\n * ```\n *\n * is equivalent to ES6:\n *\n * ```\n * class Greeter {\n * constructor(name) {\n * this.name = name;\n * }\n *\n * greet() {\n * alert('Hello ' + this.name + '!');\n * }\n * }\n * ```\n *\n * or equivalent to ES5:\n *\n * ```\n * var Greeter = function (name) {\n * this.name = name;\n * }\n *\n * Greeter.prototype.greet = function () {\n * alert('Hello ' + this.name + '!');\n * }\n * ```\n *\n * ### Example with parameter annotations\n *\n * ```\n * var MyService = ng.Class({\n * constructor: [String, [new Query(), QueryList], function(name, queryList) {\n * ...\n * }]\n * });\n * ```\n *\n * is equivalent to ES6:\n *\n * ```\n * class MyService {\n * constructor(name: string, @Query() queryList: QueryList) {\n * ...\n * }\n * }\n * ```\n *\n * ### Example with inheritance\n *\n * ```\n * var Shape = ng.Class({\n * constructor: (color) {\n * this.color = color;\n * }\n * });\n *\n * var Square = ng.Class({\n * extends: Shape,\n * constructor: function(color, size) {\n * Shape.call(this, color);\n * this.size = size;\n * }\n * });\n * ```\n */\nexport function Class(clsDef: ClassDefinition): ConcreteType {\n var constructor = applyParams(\n clsDef.hasOwnProperty('constructor') ? clsDef.constructor : undefined, 'constructor');\n var proto = constructor.prototype;\n if (clsDef.hasOwnProperty('extends')) {\n if (isFunction(clsDef.extends)) {\n (<Function>constructor).prototype = proto =\n Object.create((<Function>clsDef.extends).prototype);\n } else {\n throw new Error(\n `Class definition 'extends' property must be a constructor function was: ${stringify(clsDef.extends)}`);\n }\n }\n for (var key in clsDef) {\n if (key != 'extends' && key != 'prototype' && clsDef.hasOwnProperty(key)) {\n proto[key] = applyParams(<any>clsDef[key], key);\n }\n }\n\n if (this && this.annotations instanceof Array) {\n Reflect.defineMetadata('annotations', this.annotations, constructor);\n }\n\n if (!constructor['name']) {\n constructor['overriddenName'] = `class${_nextClassId++}`;\n }\n\n return <ConcreteType>constructor;\n}\n\nvar Reflect = global.Reflect;\n// Throw statement at top-level is disallowed by closure compiler in ES6 input.\n// Wrap in an IIFE as a work-around.\n(function checkReflect() {\n if (!(Reflect && Reflect.getMetadata)) {\n throw 'reflect-metadata shim is required when using class decorators';\n }\n})();\n\nexport function makeDecorator(\n annotationCls, chainFn: (fn: Function) => void = null): (...args: any[]) => (cls: any) => any {\n function DecoratorFactory(objOrType): (cls: any) => any {\n var annotationInstance = new (<any>annotationCls)(objOrType);\n if (this instanceof annotationCls) {\n return annotationInstance;\n } else {\n var chainAnnotation =\n isFunction(this) && this.annotations instanceof Array ? this.annotations : [];\n chainAnnotation.push(annotationInstance);\n var TypeDecorator: TypeDecorator = <TypeDecorator>function TypeDecorator(cls) {\n var annotations = Reflect.getOwnMetadata('annotations', cls);\n annotations = annotations || [];\n annotations.push(annotationInstance);\n Reflect.defineMetadata('annotations', annotations, cls);\n return cls;\n };\n TypeDecorator.annotations = chainAnnotation;\n TypeDecorator.Class = Class;\n if (chainFn) chainFn(TypeDecorator);\n return TypeDecorator;\n }\n }\n DecoratorFactory.prototype = Object.create(annotationCls.prototype);\n (<any>DecoratorFactory).annotationCls = annotationCls;\n return DecoratorFactory;\n}\n\nexport function makeParamDecorator(annotationCls): any {\n function ParamDecoratorFactory(...args): any {\n var annotationInstance = Object.create(annotationCls.prototype);\n annotationCls.apply(annotationInstance, args);\n if (this instanceof annotationCls) {\n return annotationInstance;\n } else {\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n }\n\n\n function ParamDecorator(cls, unusedKey, index): any {\n var parameters: any[][] = Reflect.getMetadata('parameters', cls);\n parameters = parameters || [];\n\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n parameters[index] = parameters[index] || [];\n var annotationsForParam: any[] = parameters[index];\n annotationsForParam.push(annotationInstance);\n\n Reflect.defineMetadata('parameters', parameters, cls);\n return cls;\n }\n }\n ParamDecoratorFactory.prototype = Object.create(annotationCls.prototype);\n (<any>ParamDecoratorFactory).annotationCls = annotationCls;\n return ParamDecoratorFactory;\n}\n\nexport function makePropDecorator(annotationCls): any {\n function PropDecoratorFactory(...args): any {\n var decoratorInstance = Object.create(annotationCls.prototype);\n annotationCls.apply(decoratorInstance, args);\n\n if (this instanceof annotationCls) {\n return decoratorInstance;\n } else {\n return function PropDecorator(target: any, name: string) {\n var meta = Reflect.getOwnMetadata('propMetadata', target.constructor);\n meta = meta || {};\n meta[name] = meta[name] || [];\n meta[name].unshift(decoratorInstance);\n Reflect.defineMetadata('propMetadata', meta, target.constructor);\n };\n }\n }\n PropDecoratorFactory.prototype = Object.create(annotationCls.prototype);\n (<any>PropDecoratorFactory).annotationCls = annotationCls;\n return PropDecoratorFactory;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/util/decorators.ts"],"names":[],"mappings":"OAAO,EAAqB,MAAM,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,gBAAgB;AAEhF,IAAI,YAAY,GAAG,CAAC,CAAC;AA4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CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IAClE,oBAAqB,CAAC,aAAa,GAAG,aAAa,CAAC;IAC1D,MAAM,CAAC,oBAAoB,CAAC;AAC9B,CAAC","sourcesContent":["import {ConcreteType, Type, global, isFunction, stringify} from '../facade/lang';\n\nvar _nextClassId = 0;\n\n/**\n * Declares the interface to be used with {@link Class}.\n */\nexport interface ClassDefinition {\n /**\n * Optional argument for specifying the superclass.\n */\n extends?: Type;\n\n /**\n * Required constructor function for a class.\n *\n * The function may be optionally wrapped in an `Array`, in which case additional parameter\n * annotations may be specified.\n * The number of arguments and the number of parameter annotations must match.\n *\n * See {@link Class} for example of usage.\n */\n constructor: Function|any[];\n\n /**\n * Other methods on the class. Note that values should have type 'Function' but TS requires\n * all properties to have a narrower type than the index signature.\n */\n [x: string]: Type|Function|any[];\n}\n\n/**\n * An interface implemented by all Angular type decorators, which allows them to be used as ES7\n * decorators as well as\n * Angular DSL syntax.\n *\n * DSL syntax:\n *\n * ```\n * var MyClass = ng\n * .Component({...})\n * .View({...})\n * .Class({...});\n * ```\n *\n * ES7 syntax:\n *\n * ```\n * @ng.Component({...})\n * @ng.View({...})\n * class MyClass {...}\n * ```\n */\nexport interface TypeDecorator {\n /**\n * Invoke as ES7 decorator.\n */\n <T extends Type>(type: T): T;\n\n // Make TypeDecorator assignable to built-in ParameterDecorator type.\n // ParameterDecorator is declared in lib.d.ts as a `declare type`\n // so we cannot declare this interface as a subtype.\n // see https://github.com/angular/angular/issues/3379#issuecomment-126169417\n (target: Object, propertyKey?: string|symbol, parameterIndex?: number): void;\n\n /**\n * Storage for the accumulated annotations so far used by the DSL syntax.\n *\n * Used by {@link Class} to annotate the generated class.\n */\n annotations: any[];\n\n /**\n * Generate a class from the definition and annotate it with {@link TypeDecorator#annotations}.\n */\n Class(obj: ClassDefinition): ConcreteType;\n}\n\nfunction extractAnnotation(annotation: any): any {\n if (isFunction(annotation) && annotation.hasOwnProperty('annotation')) {\n // it is a decorator, extract annotation\n annotation = annotation.annotation;\n }\n return annotation;\n}\n\nfunction applyParams(fnOrArray: (Function | any[]), key: string): Function {\n if (fnOrArray === Object || fnOrArray === String || fnOrArray === Function ||\n fnOrArray === Number || fnOrArray === Array) {\n throw new Error(`Can not use native ${stringify(fnOrArray)} as constructor`);\n }\n if (isFunction(fnOrArray)) {\n return <Function>fnOrArray;\n } else if (fnOrArray instanceof Array) {\n var annotations: any[] = fnOrArray;\n var fn: Function = fnOrArray[fnOrArray.length - 1];\n if (!isFunction(fn)) {\n throw new Error(\n `Last position of Class method array must be Function in key ${key} was '${stringify(fn)}'`);\n }\n var annoLength = annotations.length - 1;\n if (annoLength != fn.length) {\n throw new Error(\n `Number of annotations (${annoLength}) does not match number of arguments (${fn.length}) in the function: ${stringify(fn)}`);\n }\n var paramsAnnotations: any[][] = [];\n for (var i = 0, ii = annotations.length - 1; i < ii; i++) {\n var paramAnnotations: any[] = [];\n paramsAnnotations.push(paramAnnotations);\n var annotation = annotations[i];\n if (annotation instanceof Array) {\n for (var j = 0; j < annotation.length; j++) {\n paramAnnotations.push(extractAnnotation(annotation[j]));\n }\n } else if (isFunction(annotation)) {\n paramAnnotations.push(extractAnnotation(annotation));\n } else {\n paramAnnotations.push(annotation);\n }\n }\n Reflect.defineMetadata('parameters', paramsAnnotations, fn);\n return fn;\n } else {\n throw new Error(\n `Only Function or Array is supported in Class definition for key '${key}' is '${stringify(fnOrArray)}'`);\n }\n}\n\n/**\n * Provides a way for expressing ES6 classes with parameter annotations in ES5.\n *\n * ## Basic Example\n *\n * ```\n * var Greeter = ng.Class({\n * constructor: function(name) {\n * this.name = name;\n * },\n *\n * greet: function() {\n * alert('Hello ' + this.name + '!');\n * }\n * });\n * ```\n *\n * is equivalent to ES6:\n *\n * ```\n * class Greeter {\n * constructor(name) {\n * this.name = name;\n * }\n *\n * greet() {\n * alert('Hello ' + this.name + '!');\n * }\n * }\n * ```\n *\n * or equivalent to ES5:\n *\n * ```\n * var Greeter = function (name) {\n * this.name = name;\n * }\n *\n * Greeter.prototype.greet = function () {\n * alert('Hello ' + this.name + '!');\n * }\n * ```\n *\n * ### Example with parameter annotations\n *\n * ```\n * var MyService = ng.Class({\n * constructor: [String, [new Query(), QueryList], function(name, queryList) {\n * ...\n * }]\n * });\n * ```\n *\n * is equivalent to ES6:\n *\n * ```\n * class MyService {\n * constructor(name: string, @Query() queryList: QueryList) {\n * ...\n * }\n * }\n * ```\n *\n * ### Example with inheritance\n *\n * ```\n * var Shape = ng.Class({\n * constructor: (color) {\n * this.color = color;\n * }\n * });\n *\n * var Square = ng.Class({\n * extends: Shape,\n * constructor: function(color, size) {\n * Shape.call(this, color);\n * this.size = size;\n * }\n * });\n * ```\n * @stable\n */\nexport function Class(clsDef: ClassDefinition): ConcreteType {\n var constructor = applyParams(\n clsDef.hasOwnProperty('constructor') ? clsDef.constructor : undefined, 'constructor');\n var proto = constructor.prototype;\n if (clsDef.hasOwnProperty('extends')) {\n if (isFunction(clsDef.extends)) {\n (<Function>constructor).prototype = proto =\n Object.create((<Function>clsDef.extends).prototype);\n } else {\n throw new Error(\n `Class definition 'extends' property must be a constructor function was: ${stringify(clsDef.extends)}`);\n }\n }\n for (var key in clsDef) {\n if (key != 'extends' && key != 'prototype' && clsDef.hasOwnProperty(key)) {\n proto[key] = applyParams(<any>clsDef[key], key);\n }\n }\n\n if (this && this.annotations instanceof Array) {\n Reflect.defineMetadata('annotations', this.annotations, constructor);\n }\n\n if (!constructor['name']) {\n (constructor as any /** TODO #9100 */)['overriddenName'] = `class${_nextClassId++}`;\n }\n\n return <ConcreteType>constructor;\n}\n\nvar Reflect = global.Reflect;\n// Throw statement at top-level is disallowed by closure compiler in ES6 input.\n// Wrap in an IIFE as a work-around.\n(function checkReflect() {\n if (!(Reflect && Reflect.getMetadata)) {\n throw 'reflect-metadata shim is required when using class decorators';\n }\n})();\n\nexport function makeDecorator(\n annotationCls: any /* TODO #9100 */,\n chainFn: (fn: Function) => void = null): (...args: any[]) => (cls: any) => any {\n function DecoratorFactory(objOrType: any /** TODO #9100 */): (cls: any) => any {\n var annotationInstance = new (<any>annotationCls)(objOrType);\n if (this instanceof annotationCls) {\n return annotationInstance;\n } else {\n var chainAnnotation =\n isFunction(this) && this.annotations instanceof Array ? this.annotations : [];\n chainAnnotation.push(annotationInstance);\n var TypeDecorator: TypeDecorator =\n <TypeDecorator>function TypeDecorator(cls: any /** TODO #9100 */) {\n var annotations = Reflect.getOwnMetadata('annotations', cls);\n annotations = annotations || [];\n annotations.push(annotationInstance);\n Reflect.defineMetadata('annotations', annotations, cls);\n return cls;\n };\n TypeDecorator.annotations = chainAnnotation;\n TypeDecorator.Class = Class;\n if (chainFn) chainFn(TypeDecorator);\n return TypeDecorator;\n }\n }\n DecoratorFactory.prototype = Object.create(annotationCls.prototype);\n (<any>DecoratorFactory).annotationCls = annotationCls;\n return DecoratorFactory;\n}\n\nexport function makeParamDecorator(annotationCls: any /** TODO #9100 */): any {\n function ParamDecoratorFactory(...args: any[] /** TODO #9100 */): any {\n var annotationInstance = Object.create(annotationCls.prototype);\n annotationCls.apply(annotationInstance, args);\n if (this instanceof annotationCls) {\n return annotationInstance;\n } else {\n (<any>ParamDecorator).annotation = annotationInstance;\n return ParamDecorator;\n }\n\n\n function ParamDecorator(\n cls: any /** TODO #9100 */, unusedKey: any /** TODO #9100 */,\n index: any /** TODO #9100 */): any {\n var parameters: any[][] = Reflect.getMetadata('parameters', cls);\n parameters = parameters || [];\n\n // there might be gaps if some in between parameters do not have annotations.\n // we pad with nulls.\n while (parameters.length <= index) {\n parameters.push(null);\n }\n\n parameters[index] = parameters[index] || [];\n var annotationsForParam: any[] = parameters[index];\n annotationsForParam.push(annotationInstance);\n\n Reflect.defineMetadata('parameters', parameters, cls);\n return cls;\n }\n }\n ParamDecoratorFactory.prototype = Object.create(annotationCls.prototype);\n (<any>ParamDecoratorFactory).annotationCls = annotationCls;\n return ParamDecoratorFactory;\n}\n\nexport function makePropDecorator(annotationCls: any /** TODO #9100 */): any {\n function PropDecoratorFactory(...args: any[] /** TODO #9100 */): any {\n var decoratorInstance = Object.create(annotationCls.prototype);\n annotationCls.apply(decoratorInstance, args);\n\n if (this instanceof annotationCls) {\n return decoratorInstance;\n } else {\n return function PropDecorator(target: any, name: string) {\n var meta = Reflect.getOwnMetadata('propMetadata', target.constructor);\n meta = meta || {};\n meta[name] = meta[name] || [];\n meta[name].unshift(decoratorInstance);\n Reflect.defineMetadata('propMetadata', meta, target.constructor);\n };\n }\n }\n PropDecoratorFactory.prototype = Object.create(annotationCls.prototype);\n (<any>PropDecoratorFactory).annotationCls = annotationCls;\n return PropDecoratorFactory;\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/esm/src/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/util.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,SAAQ,KAAK,QAAuC,mBAAmB,CAAC","sourcesContent":["// Public API for util\nexport {Class, ClassDefinition, TypeDecorator} from './util/decorators';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '
|
|
1
|
+
import { EventEmitter } from '../facade/async';
|
|
2
2
|
export { NgZoneError } from './ng_zone_impl';
|
|
3
3
|
/**
|
|
4
4
|
* An injectable service for executing work inside or outside of the Angular zone.
|
|
@@ -70,6 +70,7 @@ export { NgZoneError } from './ng_zone_impl';
|
|
|
70
70
|
* }
|
|
71
71
|
* }
|
|
72
72
|
* ```
|
|
73
|
+
* @experimental
|
|
73
74
|
*/
|
|
74
75
|
export declare class NgZone {
|
|
75
76
|
static isInAngularZone(): boolean;
|
|
@@ -78,22 +79,6 @@ export declare class NgZone {
|
|
|
78
79
|
private _zoneImpl;
|
|
79
80
|
private _hasPendingMicrotasks;
|
|
80
81
|
private _hasPendingMacrotasks;
|
|
81
|
-
/** @internal */
|
|
82
|
-
private _isStable;
|
|
83
|
-
/** @internal */
|
|
84
|
-
private _nesting;
|
|
85
|
-
/** @internal */
|
|
86
|
-
private _onUnstable;
|
|
87
|
-
/** @internal */
|
|
88
|
-
private _onMicrotaskEmpty;
|
|
89
|
-
/** @internal */
|
|
90
|
-
private _onStable;
|
|
91
|
-
/** @internal */
|
|
92
|
-
private _onErrorEvents;
|
|
93
|
-
/**
|
|
94
|
-
* @param {bool} enableLongStackTrace whether to enable long stack trace. They should only be
|
|
95
|
-
* enabled in development mode as they significantly impact perf.
|
|
96
|
-
*/
|
|
97
82
|
constructor({enableLongStackTrace}: {
|
|
98
83
|
enableLongStackTrace?: boolean;
|
|
99
84
|
});
|
|
@@ -118,6 +103,10 @@ export declare class NgZone {
|
|
|
118
103
|
* Notify that an error has been delivered.
|
|
119
104
|
*/
|
|
120
105
|
readonly onError: EventEmitter<any>;
|
|
106
|
+
/**
|
|
107
|
+
* Whether there are no outstanding microtasks or microtasks.
|
|
108
|
+
*/
|
|
109
|
+
readonly isStable: boolean;
|
|
121
110
|
/**
|
|
122
111
|
* Whether there are any outstanding microtasks.
|
|
123
112
|
*/
|
package/esm/src/zone/ng_zone.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EventEmitter } from '
|
|
1
|
+
import { EventEmitter } from '../facade/async';
|
|
2
|
+
import { BaseException } from '../facade/exceptions';
|
|
2
3
|
import { NgZoneImpl } from './ng_zone_impl';
|
|
3
|
-
import { BaseException } from '../../src/facade/exceptions';
|
|
4
4
|
export { NgZoneError } from './ng_zone_impl';
|
|
5
5
|
/**
|
|
6
6
|
* An injectable service for executing work inside or outside of the Angular zone.
|
|
@@ -72,12 +72,9 @@ export { NgZoneError } from './ng_zone_impl';
|
|
|
72
72
|
* }
|
|
73
73
|
* }
|
|
74
74
|
* ```
|
|
75
|
+
* @experimental
|
|
75
76
|
*/
|
|
76
77
|
export class NgZone {
|
|
77
|
-
/**
|
|
78
|
-
* @param {bool} enableLongStackTrace whether to enable long stack trace. They should only be
|
|
79
|
-
* enabled in development mode as they significantly impact perf.
|
|
80
|
-
*/
|
|
81
78
|
constructor({ enableLongStackTrace = false }) {
|
|
82
79
|
this._hasPendingMicrotasks = false;
|
|
83
80
|
this._hasPendingMacrotasks = false;
|
|
@@ -171,6 +168,10 @@ export class NgZone {
|
|
|
171
168
|
* Notify that an error has been delivered.
|
|
172
169
|
*/
|
|
173
170
|
get onError() { return this._onErrorEvents; }
|
|
171
|
+
/**
|
|
172
|
+
* Whether there are no outstanding microtasks or microtasks.
|
|
173
|
+
*/
|
|
174
|
+
get isStable() { return this._isStable; }
|
|
174
175
|
/**
|
|
175
176
|
* Whether there are any outstanding microtasks.
|
|
176
177
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng_zone.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/zone/ng_zone.ts"],"names":[],"mappings":"OAIS,EAAC,YAAY,EAAC,MAAM,wBAAwB;OAC9C,EAAC,UAAU,EAAc,MAAM,gBAAgB;OAC/C,EAAC,aAAa,EAAC,MAAM,6BAA6B;AACzD,SAAQ,WAAW,QAAO,gBAAgB,CAAC;AAG3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AACH;IA+BE;;;OAGG;IACH,YAAY,EAAC,oBAAoB,GAAG,KAAK,EAAC;QApBlC,0BAAqB,GAAY,KAAK,CAAC;QACvC,0BAAqB,GAAY,KAAK,CAAC;QAE/C,gBAAgB;QACR,cAAS,GAAG,IAAI,CAAC;QACzB,gBAAgB;QACR,aAAQ,GAAG,CAAC,CAAC;QACrB,gBAAgB;QACR,gBAAW,GAAsB,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QACjE,gBAA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,CAAC,CAAC,CAAC;IAEhE;;OAEG;IACH,IAAI,oBAAoB,KAAc,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAE1E;;OAEG;IACH,IAAI,oBAAoB,KAAc,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAE1E;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,EAAa,IAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE/D;;;OAGG;IACH,UAAU,CAAC,EAAa,IAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE7E;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAa,IAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAAA","sourcesContent":["interface DecoratorInvocation {\n type: Function;\n args?: any[];\n }\n import {EventEmitter} from '../../src/facade/async';\nimport {NgZoneImpl, NgZoneError} from './ng_zone_impl';\nimport {BaseException} from '../../src/facade/exceptions';\nexport {NgZoneError} from './ng_zone_impl';\n\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview))\n * ```\n * import {Component, View, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo'.\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * directives: [NgIf]\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => {console.log('Outside Done!') });\n * }}));\n * }\n *\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback)), 10)\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n */\nexport class NgZone {\n static isInAngularZone(): boolean { return NgZoneImpl.isInAngularZone(); }\n static assertInAngularZone(): void {\n if (!NgZoneImpl.isInAngularZone()) {\n throw new BaseException('Expected to be in Angular Zone, but it is not!');\n }\n }\n static assertNotInAngularZone(): void {\n if (NgZoneImpl.isInAngularZone()) {\n throw new BaseException('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n private _zoneImpl: NgZoneImpl;\n\n private _hasPendingMicrotasks: boolean = false;\n private _hasPendingMacrotasks: boolean = false;\n\n /** @internal */\n private _isStable = true;\n /** @internal */\n private _nesting = 0;\n /** @internal */\n private _onUnstable: EventEmitter<any> = new EventEmitter(false);\n /** @internal */\n private _onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n /** @internal */\n private _onStable: EventEmitter<any> = new EventEmitter(false);\n /** @internal */\n private _onErrorEvents: EventEmitter<any> = new EventEmitter(false);\n\n /**\n * @param {bool} enableLongStackTrace whether to enable long stack trace. They should only be\n * enabled in development mode as they significantly impact perf.\n */\n constructor({enableLongStackTrace = false}) {\n this._zoneImpl = new NgZoneImpl({\n trace: enableLongStackTrace,\n onEnter: () => {\n // console.log('ZONE.enter', this._nesting, this._isStable);\n this._nesting++;\n if (this._isStable) {\n this._isStable = false;\n this._onUnstable.emit(null);\n }\n },\n onLeave: () => {\n this._nesting--;\n // console.log('ZONE.leave', this._nesting, this._isStable);\n this._checkStable();\n },\n setMicrotask: (hasMicrotasks: boolean) => {\n this._hasPendingMicrotasks = hasMicrotasks;\n this._checkStable();\n },\n setMacrotask: (hasMacrotasks: boolean) => { this._hasPendingMacrotasks = hasMacrotasks; },\n onError: (error: NgZoneError) => this._onErrorEvents.emit(error)\n });\n }\n\n private _checkStable() {\n if (this._nesting == 0) {\n if (!this._hasPendingMicrotasks && !this._isStable) {\n try {\n // console.log('ZONE.microtaskEmpty');\n this._nesting++;\n this._onMicrotaskEmpty.emit(null);\n } finally {\n this._nesting--;\n if (!this._hasPendingMicrotasks) {\n try {\n // console.log('ZONE.stable', this._nesting, this._isStable);\n this.runOutsideAngular(() => this._onStable.emit(null));\n } finally {\n this._isStable = true;\n }\n }\n }\n }\n }\n };\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n get onUnstable(): EventEmitter<any> { return this._onUnstable; }\n\n /**\n * Notifies when there is no more microtasks enqueue in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n get onMicrotaskEmpty(): EventEmitter<any> { return this._onMicrotaskEmpty; }\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n get onStable(): EventEmitter<any> { return this._onStable; }\n\n /**\n * Notify that an error has been delivered.\n */\n get onError(): EventEmitter<any> { return this._onErrorEvents; }\n\n /**\n * Whether there are any outstanding microtasks.\n */\n get hasPendingMicrotasks(): boolean { return this._hasPendingMicrotasks; }\n\n /**\n * Whether there are any outstanding microtasks.\n */\n get hasPendingMacrotasks(): boolean { return this._hasPendingMacrotasks; }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run(fn: () => any): any { return this._zoneImpl.runInner(fn); }\n\n /**\n * Same as #run, except that synchronous errors are caught and forwarded\n * via `onError` and not rethrown.\n */\n runGuarded(fn: () => any): any { return this._zoneImpl.runInnerGuarded(fn); }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via `runOutsideAngular` allows you to escape Angular's zone and do work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular(fn: () => any): any { return this._zoneImpl.runOuter(fn); }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"ng_zone.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/zone/ng_zone.ts"],"names":[],"mappings":"OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB;OACrC,EAAC,aAAa,EAAC,MAAM,sBAAsB;OAE3C,EAAc,UAAU,EAAC,MAAM,gBAAgB;AAEtD,SAAQ,WAAW,QAAO,gBAAgB,CAAC;AAI3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAEhE;;;;OAIG;IACH,IAAI,gBAAgB,KAAwB,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;IAE5E;;;;OAIG;IACH,IAAI,QAAQ,KAAwB,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAE5D;;OAEG;IACH,IAAI,OAAO,KAAwB,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC;IAEhE;;OAEG;IACH,IAAI,QAAQ,KAAc,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC;IAElD;;OAEG;IACH,IAAI,oBAAoB,KAAc,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAE1E;;OAEG;IACH,IAAI,oBAAoB,KAAc,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAE1E;;;;;;;;;;;OAWG;IACH,GAAG,CAAC,EAAa,IAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE/D;;;OAGG;IACH,UAAU,CAAC,EAAa,IAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAE7E;;;;;;;;;;;OAWG;IACH,iBAAiB,CAAC,EAAa,IAAS,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAAA","sourcesContent":["import {EventEmitter} from '../facade/async';\nimport {BaseException} from '../facade/exceptions';\n\nimport {NgZoneError, NgZoneImpl} from './ng_zone_impl';\n\nexport {NgZoneError} from './ng_zone_impl';\n\n\n\n/**\n * An injectable service for executing work inside or outside of the Angular zone.\n *\n * The most common use of this service is to optimize performance when starting a work consisting of\n * one or more asynchronous tasks that don't require UI updates or error handling to be handled by\n * Angular. Such tasks can be kicked off via {@link #runOutsideAngular} and if needed, these tasks\n * can reenter the Angular zone via {@link #run}.\n *\n * <!-- TODO: add/fix links to:\n * - docs explaining zones and the use of zones in Angular and change-detection\n * - link to runOutsideAngular/run (throughout this file!)\n * -->\n *\n * ### Example ([live demo](http://plnkr.co/edit/lY9m8HLy7z06vDoUaSN2?p=preview))\n * ```\n * import {Component, View, NgZone} from '@angular/core';\n * import {NgIf} from '@angular/common';\n *\n * @Component({\n * selector: 'ng-zone-demo'.\n * template: `\n * <h2>Demo: NgZone</h2>\n *\n * <p>Progress: {{progress}}%</p>\n * <p *ngIf=\"progress >= 100\">Done processing {{label}} of Angular zone!</p>\n *\n * <button (click)=\"processWithinAngularZone()\">Process within Angular zone</button>\n * <button (click)=\"processOutsideOfAngularZone()\">Process outside of Angular zone</button>\n * `,\n * directives: [NgIf]\n * })\n * export class NgZoneDemo {\n * progress: number = 0;\n * label: string;\n *\n * constructor(private _ngZone: NgZone) {}\n *\n * // Loop inside the Angular zone\n * // so the UI DOES refresh after each setTimeout cycle\n * processWithinAngularZone() {\n * this.label = 'inside';\n * this.progress = 0;\n * this._increaseProgress(() => console.log('Inside Done!'));\n * }\n *\n * // Loop outside of the Angular zone\n * // so the UI DOES NOT refresh after each setTimeout cycle\n * processOutsideOfAngularZone() {\n * this.label = 'outside';\n * this.progress = 0;\n * this._ngZone.runOutsideAngular(() => {\n * this._increaseProgress(() => {\n * // reenter the Angular zone and display done\n * this._ngZone.run(() => {console.log('Outside Done!') });\n * }}));\n * }\n *\n *\n * _increaseProgress(doneCallback: () => void) {\n * this.progress += 1;\n * console.log(`Current progress: ${this.progress}%`);\n *\n * if (this.progress < 100) {\n * window.setTimeout(() => this._increaseProgress(doneCallback)), 10)\n * } else {\n * doneCallback();\n * }\n * }\n * }\n * ```\n * @experimental\n */\nexport class NgZone {\n static isInAngularZone(): boolean { return NgZoneImpl.isInAngularZone(); }\n static assertInAngularZone(): void {\n if (!NgZoneImpl.isInAngularZone()) {\n throw new BaseException('Expected to be in Angular Zone, but it is not!');\n }\n }\n static assertNotInAngularZone(): void {\n if (NgZoneImpl.isInAngularZone()) {\n throw new BaseException('Expected to not be in Angular Zone, but it is!');\n }\n }\n\n private _zoneImpl: NgZoneImpl;\n\n private _hasPendingMicrotasks: boolean = false;\n private _hasPendingMacrotasks: boolean = false;\n\n /** @internal */\n private _isStable = true;\n /** @internal */\n private _nesting = 0;\n /** @internal */\n private _onUnstable: EventEmitter<any> = new EventEmitter(false);\n /** @internal */\n private _onMicrotaskEmpty: EventEmitter<any> = new EventEmitter(false);\n /** @internal */\n private _onStable: EventEmitter<any> = new EventEmitter(false);\n /** @internal */\n private _onErrorEvents: EventEmitter<any> = new EventEmitter(false);\n\n constructor({enableLongStackTrace = false}) {\n this._zoneImpl = new NgZoneImpl({\n trace: enableLongStackTrace,\n onEnter: () => {\n // console.log('ZONE.enter', this._nesting, this._isStable);\n this._nesting++;\n if (this._isStable) {\n this._isStable = false;\n this._onUnstable.emit(null);\n }\n },\n onLeave: () => {\n this._nesting--;\n // console.log('ZONE.leave', this._nesting, this._isStable);\n this._checkStable();\n },\n setMicrotask: (hasMicrotasks: boolean) => {\n this._hasPendingMicrotasks = hasMicrotasks;\n this._checkStable();\n },\n setMacrotask: (hasMacrotasks: boolean) => { this._hasPendingMacrotasks = hasMacrotasks; },\n onError: (error: NgZoneError) => this._onErrorEvents.emit(error)\n });\n }\n\n private _checkStable() {\n if (this._nesting == 0) {\n if (!this._hasPendingMicrotasks && !this._isStable) {\n try {\n // console.log('ZONE.microtaskEmpty');\n this._nesting++;\n this._onMicrotaskEmpty.emit(null);\n } finally {\n this._nesting--;\n if (!this._hasPendingMicrotasks) {\n try {\n // console.log('ZONE.stable', this._nesting, this._isStable);\n this.runOutsideAngular(() => this._onStable.emit(null));\n } finally {\n this._isStable = true;\n }\n }\n }\n }\n }\n };\n\n /**\n * Notifies when code enters Angular Zone. This gets fired first on VM Turn.\n */\n get onUnstable(): EventEmitter<any> { return this._onUnstable; }\n\n /**\n * Notifies when there is no more microtasks enqueue in the current VM Turn.\n * This is a hint for Angular to do change detection, which may enqueue more microtasks.\n * For this reason this event can fire multiple times per VM Turn.\n */\n get onMicrotaskEmpty(): EventEmitter<any> { return this._onMicrotaskEmpty; }\n\n /**\n * Notifies when the last `onMicrotaskEmpty` has run and there are no more microtasks, which\n * implies we are about to relinquish VM turn.\n * This event gets called just once.\n */\n get onStable(): EventEmitter<any> { return this._onStable; }\n\n /**\n * Notify that an error has been delivered.\n */\n get onError(): EventEmitter<any> { return this._onErrorEvents; }\n\n /**\n * Whether there are no outstanding microtasks or microtasks.\n */\n get isStable(): boolean { return this._isStable; }\n\n /**\n * Whether there are any outstanding microtasks.\n */\n get hasPendingMicrotasks(): boolean { return this._hasPendingMicrotasks; }\n\n /**\n * Whether there are any outstanding microtasks.\n */\n get hasPendingMacrotasks(): boolean { return this._hasPendingMacrotasks; }\n\n /**\n * Executes the `fn` function synchronously within the Angular zone and returns value returned by\n * the function.\n *\n * Running functions via `run` allows you to reenter Angular zone from a task that was executed\n * outside of the Angular zone (typically started via {@link #runOutsideAngular}).\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * within the Angular zone.\n *\n * If a synchronous error happens it will be rethrown and not reported via `onError`.\n */\n run(fn: () => any): any { return this._zoneImpl.runInner(fn); }\n\n /**\n * Same as #run, except that synchronous errors are caught and forwarded\n * via `onError` and not rethrown.\n */\n runGuarded(fn: () => any): any { return this._zoneImpl.runInnerGuarded(fn); }\n\n /**\n * Executes the `fn` function synchronously in Angular's parent zone and returns value returned by\n * the function.\n *\n * Running functions via `runOutsideAngular` allows you to escape Angular's zone and do work that\n * doesn't trigger Angular change-detection or is subject to Angular's error handling.\n *\n * Any future tasks or microtasks scheduled from within this function will continue executing from\n * outside of the Angular zone.\n *\n * Use {@link #run} to reenter the Angular zone and do work that updates the application model.\n */\n runOutsideAngular(fn: () => any): any { return this._zoneImpl.runOuter(fn); }\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Stores error information; delivered via [NgZone.onError] stream.
|
|
3
|
+
* @deprecated
|
|
3
4
|
*/
|
|
4
5
|
export declare class NgZoneError {
|
|
5
6
|
error: any;
|
|
@@ -8,10 +9,6 @@ export declare class NgZoneError {
|
|
|
8
9
|
}
|
|
9
10
|
export declare class NgZoneImpl {
|
|
10
11
|
static isInAngularZone(): boolean;
|
|
11
|
-
/** @internal */
|
|
12
|
-
private outer;
|
|
13
|
-
/** @internal */
|
|
14
|
-
private inner;
|
|
15
12
|
private onEnter;
|
|
16
13
|
private onLeave;
|
|
17
14
|
private setMicrotask;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ng_zone_impl.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/zone/ng_zone_impl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ng_zone_impl.js","sourceRoot":"","sources":["../../../../../../modules/@angular/core/src/zone/ng_zone_impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH;IACE,YAAmB,KAAU,EAAS,UAAe;QAAlC,UAAK,GAAL,KAAK,CAAK;QAAS,eAAU,GAAV,UAAU,CAAK;IAAG,CAAC;AAC3D,CAAC;AAGD;IAcE,YAAY,EAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAOxE;QACC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAEvB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;YACT,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAA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AS,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;;IACzE,QAAQ,CAAC,EAAa,IAAS,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;;AAC7D,CAAC;AAAA","sourcesContent":["/**\n * Stores error information; delivered via [NgZone.onError] stream.\n * @deprecated\n */\nexport class NgZoneError {\n constructor(public error: any, public stackTrace: any) {}\n}\n\n\nexport class NgZoneImpl {\n static isInAngularZone(): boolean { return Zone.current.get('isAngularZone') === true; }\n\n /** @internal */\n private outer: Zone;\n /** @internal */\n private inner: Zone;\n\n private onEnter: () => void;\n private onLeave: () => void;\n private setMicrotask: (hasMicrotasks: boolean) => void;\n private setMacrotask: (hasMacrotasks: boolean) => void;\n private onError: (error: NgZoneError) => void;\n\n constructor({trace, onEnter, onLeave, setMicrotask, setMacrotask, onError}: {\n trace: boolean,\n onEnter: () => void,\n onLeave: () => void,\n setMicrotask: (hasMicrotasks: boolean) => void,\n setMacrotask: (hasMacrotasks: boolean) => void,\n onError: (error: NgZoneError) => void\n }) {\n this.onEnter = onEnter;\n this.onLeave = onLeave;\n this.setMicrotask = setMicrotask;\n this.setMacrotask = setMacrotask;\n this.onError = onError;\n\n if (Zone) {\n this.outer = this.inner = Zone.current;\n if ((Zone as any /** TODO #9100 */)['wtfZoneSpec']) {\n this.inner = this.inner.fork((Zone as any /** TODO #9100 */)['wtfZoneSpec']);\n }\n if (trace && (Zone as any /** TODO #9100 */)['longStackTraceZoneSpec']) {\n this.inner = this.inner.fork((Zone as any /** TODO #9100 */)['longStackTraceZoneSpec']);\n }\n this.inner = this.inner.fork({\n name: 'angular',\n properties: <any>{'isAngularZone': true},\n onInvokeTask: (delegate: ZoneDelegate, current: Zone, target: Zone, task: Task,\n applyThis: any, applyArgs: any): any => {\n try {\n this.onEnter();\n return delegate.invokeTask(target, task, applyThis, applyArgs);\n } finally {\n this.onLeave();\n }\n },\n\n\n onInvoke: (delegate: ZoneDelegate, current: Zone, target: Zone, callback: Function,\n applyThis: any, applyArgs: any[], source: string): any => {\n try {\n this.onEnter();\n return delegate.invoke(target, callback, applyThis, applyArgs, source);\n } finally {\n this.onLeave();\n }\n },\n\n onHasTask:\n (delegate: ZoneDelegate, current: Zone, target: Zone, hasTaskState: HasTaskState) => {\n delegate.hasTask(target, hasTaskState);\n if (current == target) {\n // We are only interested in hasTask events which originate from our zone\n // (A child hasTask event is not interesting to us)\n if (hasTaskState.change == 'microTask') {\n this.setMicrotask(hasTaskState.microTask);\n } else if (hasTaskState.change == 'macroTask') {\n this.setMacrotask(hasTaskState.macroTask);\n }\n }\n },\n\n onHandleError: (delegate: ZoneDelegate, current: Zone, target: Zone, error: any):\n boolean => {\n delegate.handleError(target, error);\n this.onError(new NgZoneError(error, error.stack));\n return false;\n }\n });\n } else {\n throw new Error('Angular requires Zone.js polyfill.');\n }\n }\n\n runInner(fn: () => any): any { return this.inner.run(fn); };\n runInnerGuarded(fn: () => any): any { return this.inner.runGuarded(fn); };\n runOuter(fn: () => any): any { return this.outer.run(fn); };\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|
package/esm/src/zone.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zone.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/zone.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"zone.js","sourceRoot":"","sources":["../../../../../modules/@angular/core/src/zone.ts"],"names":[],"mappings":"AAAA,sBAAsB;AACtB,SAAQ,MAAM,EAAE,WAAW,QAAO,gBAAgB,CAAC","sourcesContent":["// Public API for Zone\nexport {NgZone, NgZoneError} from './zone/ng_zone';\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]}
|