@angular/core 7.1.0 → 7.1.4

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.
Files changed (406) hide show
  1. package/bundles/core-testing.umd.js +1 -1
  2. package/bundles/core-testing.umd.js.map +1 -1
  3. package/bundles/core-testing.umd.min.js +1 -1
  4. package/bundles/core-testing.umd.min.js.map +1 -1
  5. package/bundles/core.umd.js +48 -33
  6. package/bundles/core.umd.js.map +1 -1
  7. package/bundles/core.umd.min.js +106 -98
  8. package/bundles/core.umd.min.js.map +1 -1
  9. package/core.metadata.json +1 -1
  10. package/esm2015/core.externs.js +44 -34
  11. package/esm2015/core.js +1 -2
  12. package/esm2015/index.js +3 -4
  13. package/esm2015/public_api.js +3 -5
  14. package/esm2015/src/application_init.js +6 -6
  15. package/esm2015/src/application_module.js +6 -5
  16. package/esm2015/src/application_ref.js +31 -22
  17. package/esm2015/src/application_tokens.js +21 -16
  18. package/esm2015/src/change_detection/change_detection.js +8 -7
  19. package/esm2015/src/change_detection/change_detection_util.js +2 -4
  20. package/esm2015/src/change_detection/change_detector_ref.js +2 -3
  21. package/esm2015/src/change_detection/constants.js +30 -32
  22. package/esm2015/src/change_detection/differs/default_iterable_differ.js +51 -15
  23. package/esm2015/src/change_detection/differs/default_keyvalue_differ.js +7 -6
  24. package/esm2015/src/change_detection/differs/iterable_differs.js +100 -90
  25. package/esm2015/src/change_detection/differs/keyvalue_differs.js +85 -73
  26. package/esm2015/src/change_detection/pipe_transform.js +10 -5
  27. package/esm2015/src/change_detection.js +7 -3
  28. package/esm2015/src/codegen_private_exports.js +2 -3
  29. package/esm2015/src/console.js +3 -3
  30. package/esm2015/src/core.js +3 -4
  31. package/esm2015/src/core_private_export.js +2 -3
  32. package/esm2015/src/core_render3_private_export.js +7 -4
  33. package/esm2015/src/debug/debug_node.js +4 -4
  34. package/esm2015/src/di/defs.js +59 -50
  35. package/esm2015/src/di/forward_ref.js +5 -6
  36. package/esm2015/src/di/injectable.js +11 -11
  37. package/esm2015/src/di/injection_token.js +6 -5
  38. package/esm2015/src/di/injector.js +55 -48
  39. package/esm2015/src/di/injector_compatibility.js +27 -20
  40. package/esm2015/src/di/metadata.js +22 -13
  41. package/esm2015/src/di/provider.js +137 -120
  42. package/esm2015/src/di/r3_injector.js +61 -38
  43. package/esm2015/src/di/reflective_errors.js +19 -13
  44. package/esm2015/src/di/reflective_injector.js +10 -15
  45. package/esm2015/src/di/reflective_key.js +3 -4
  46. package/esm2015/src/di/reflective_provider.js +21 -20
  47. package/esm2015/src/di/scope.js +5 -5
  48. package/esm2015/src/di/util.js +13 -14
  49. package/esm2015/src/di.js +3 -4
  50. package/esm2015/src/error_handler.js +5 -4
  51. package/esm2015/src/errors.js +7 -8
  52. package/esm2015/src/event_emitter.js +3 -3
  53. package/esm2015/src/i18n/tokens.js +12 -10
  54. package/esm2015/src/is_dev_mode.js +2 -3
  55. package/esm2015/src/ivy_switch.js +2 -3
  56. package/esm2015/src/linker/compiler.js +5 -8
  57. package/esm2015/src/linker/component_factory.js +2 -3
  58. package/esm2015/src/linker/component_factory_resolver.js +4 -5
  59. package/esm2015/src/linker/element_ref.js +5 -3
  60. package/esm2015/src/linker/ng_module_factory.js +6 -5
  61. package/esm2015/src/linker/ng_module_factory_loader.js +2 -3
  62. package/esm2015/src/linker/query_list.js +12 -13
  63. package/esm2015/src/linker/system_js_ng_module_factory_loader.js +2 -3
  64. package/esm2015/src/linker/template_ref.js +2 -3
  65. package/esm2015/src/linker/view_container_ref.js +2 -3
  66. package/esm2015/src/linker/view_ref.js +13 -7
  67. package/esm2015/src/linker.js +3 -3
  68. package/esm2015/src/metadata/di.js +22 -15
  69. package/esm2015/src/metadata/directives.js +34 -19
  70. package/esm2015/src/metadata/lifecycle_hooks.js +81 -66
  71. package/esm2015/src/metadata/ng_module.js +82 -68
  72. package/esm2015/src/metadata/resource_loading.js +4 -3
  73. package/esm2015/src/metadata/view.js +25 -26
  74. package/esm2015/src/metadata.js +6 -3
  75. package/esm2015/src/platform_core_providers.js +5 -5
  76. package/esm2015/src/profile/profile.js +17 -13
  77. package/esm2015/src/profile/wtf_impl.js +36 -16
  78. package/esm2015/src/r3_symbols.js +18 -5
  79. package/esm2015/src/reflection/platform_reflection_capabilities.js +81 -40
  80. package/esm2015/src/reflection/reflection.js +5 -5
  81. package/esm2015/src/reflection/reflection_capabilities.js +31 -26
  82. package/esm2015/src/reflection/reflector.js +2 -3
  83. package/esm2015/src/reflection/types.js +2 -12
  84. package/esm2015/src/render/api.js +67 -47
  85. package/esm2015/src/render.js +3 -3
  86. package/esm2015/src/render3/assert.js +5 -3
  87. package/esm2015/src/render3/component.js +66 -64
  88. package/esm2015/src/render3/component_ref.js +24 -21
  89. package/esm2015/src/render3/context_discovery.js +37 -17
  90. package/esm2015/src/render3/debug.js +9 -6
  91. package/esm2015/src/render3/definition.js +28 -28
  92. package/esm2015/src/render3/di.js +66 -39
  93. package/esm2015/src/render3/di_setup.js +34 -14
  94. package/esm2015/src/render3/discovery_utils.js +16 -17
  95. package/esm2015/src/render3/errors.js +2 -3
  96. package/esm2015/src/render3/features/inherit_definition_feature.js +12 -8
  97. package/esm2015/src/render3/features/ng_onchanges_feature.js +5 -6
  98. package/esm2015/src/render3/features/providers_feature.js +2 -3
  99. package/esm2015/src/render3/fields.js +5 -5
  100. package/esm2015/src/render3/global_utils.js +19 -6
  101. package/esm2015/src/render3/global_utils_api.js +12 -6
  102. package/esm2015/src/render3/hooks.js +4 -5
  103. package/esm2015/src/render3/i18n.js +112 -89
  104. package/esm2015/src/render3/index.js +11 -3
  105. package/esm2015/src/render3/instructions.js +201 -150
  106. package/esm2015/src/render3/interfaces/container.js +27 -5
  107. package/esm2015/src/render3/interfaces/context.js +38 -36
  108. package/esm2015/src/render3/interfaces/definition.js +234 -261
  109. package/esm2015/src/render3/interfaces/i18n.js +154 -126
  110. package/esm2015/src/render3/interfaces/injector.js +93 -10
  111. package/esm2015/src/render3/interfaces/node.js +369 -373
  112. package/esm2015/src/render3/interfaces/player.js +78 -37
  113. package/esm2015/src/render3/interfaces/projection.js +5 -10
  114. package/esm2015/src/render3/interfaces/query.js +66 -60
  115. package/esm2015/src/render3/interfaces/renderer.js +288 -117
  116. package/esm2015/src/render3/interfaces/sanitization.js +2 -6
  117. package/esm2015/src/render3/interfaces/styling.js +26 -6
  118. package/esm2015/src/render3/interfaces/view.js +326 -285
  119. package/esm2015/src/render3/jit/compiler_facade.js +10 -4
  120. package/esm2015/src/render3/jit/compiler_facade_interface.js +189 -152
  121. package/esm2015/src/render3/jit/directive.js +6 -6
  122. package/esm2015/src/render3/jit/environment.js +5 -5
  123. package/esm2015/src/render3/jit/injectable.js +6 -8
  124. package/esm2015/src/render3/jit/module.js +17 -13
  125. package/esm2015/src/render3/jit/pipe.js +2 -3
  126. package/esm2015/src/render3/jit/util.js +2 -3
  127. package/esm2015/src/render3/metadata.js +11 -10
  128. package/esm2015/src/render3/ng_dev_mode.js +5 -6
  129. package/esm2015/src/render3/ng_module_ref.js +11 -10
  130. package/esm2015/src/render3/node_assert.js +2 -3
  131. package/esm2015/src/render3/node_manipulation.js +86 -73
  132. package/esm2015/src/render3/node_selector_matcher.js +13 -12
  133. package/esm2015/src/render3/pipe.js +4 -5
  134. package/esm2015/src/render3/players.js +11 -5
  135. package/esm2015/src/render3/pure_function.js +29 -3
  136. package/esm2015/src/render3/query.js +74 -70
  137. package/esm2015/src/render3/state.js +44 -33
  138. package/esm2015/src/render3/styling/class_and_style_bindings.js +62 -43
  139. package/esm2015/src/render3/styling/core_player_handler.js +2 -3
  140. package/esm2015/src/render3/styling/player_factory.js +3 -4
  141. package/esm2015/src/render3/styling/util.js +18 -13
  142. package/esm2015/src/render3/tokens.js +7 -6
  143. package/esm2015/src/render3/util.js +18 -16
  144. package/esm2015/src/render3/view_engine_compatibility.js +18 -18
  145. package/esm2015/src/render3/view_engine_compatibility_prebound.js +2 -3
  146. package/esm2015/src/render3/view_ref.js +7 -10
  147. package/esm2015/src/sanitization/bypass.js +29 -6
  148. package/esm2015/src/sanitization/html_sanitizer.js +41 -15
  149. package/esm2015/src/sanitization/inert_body.js +14 -12
  150. package/esm2015/src/sanitization/sanitization.js +7 -7
  151. package/esm2015/src/sanitization/security.js +3 -4
  152. package/esm2015/src/sanitization/style_sanitizer.js +10 -7
  153. package/esm2015/src/sanitization/url_sanitizer.js +9 -7
  154. package/esm2015/src/testability/testability.js +47 -37
  155. package/esm2015/src/type.js +6 -8
  156. package/esm2015/src/util/decorators.js +19 -14
  157. package/esm2015/src/util/lang.js +2 -3
  158. package/esm2015/src/util/noop.js +2 -3
  159. package/esm2015/src/util/property.js +3 -4
  160. package/esm2015/src/util.js +12 -4
  161. package/esm2015/src/version.js +6 -6
  162. package/esm2015/src/view/element.js +17 -17
  163. package/esm2015/src/view/entrypoint.js +7 -3
  164. package/esm2015/src/view/errors.js +4 -5
  165. package/esm2015/src/view/index.js +2 -3
  166. package/esm2015/src/view/ng_content.js +3 -4
  167. package/esm2015/src/view/ng_module.js +2 -3
  168. package/esm2015/src/view/provider.js +89 -24
  169. package/esm2015/src/view/pure_expression.js +14 -15
  170. package/esm2015/src/view/query.js +14 -14
  171. package/esm2015/src/view/refs.js +24 -22
  172. package/esm2015/src/view/services.js +41 -31
  173. package/esm2015/src/view/text.js +5 -6
  174. package/esm2015/src/view/types.js +386 -324
  175. package/esm2015/src/view/util.js +29 -24
  176. package/esm2015/src/view/view.js +43 -36
  177. package/esm2015/src/view/view_attach.js +9 -10
  178. package/esm2015/src/zone/ng_zone.js +29 -28
  179. package/esm2015/src/zone.js +3 -3
  180. package/esm2015/testing/index.js +2 -3
  181. package/esm2015/testing/public_api.js +4 -4
  182. package/esm2015/testing/src/async.js +2 -3
  183. package/esm2015/testing/src/async_fallback.js +8 -7
  184. package/esm2015/testing/src/async_test_completer.js +2 -3
  185. package/esm2015/testing/src/before_each.js +10 -4
  186. package/esm2015/testing/src/component_fixture.js +6 -7
  187. package/esm2015/testing/src/fake_async.js +9 -3
  188. package/esm2015/testing/src/fake_async_fallback.js +5 -5
  189. package/esm2015/testing/src/lang_utils.js +3 -4
  190. package/esm2015/testing/src/logger.js +2 -3
  191. package/esm2015/testing/src/metadata_override.js +2 -6
  192. package/esm2015/testing/src/metadata_overrider.js +5 -7
  193. package/esm2015/testing/src/ng_zone_mock.js +2 -3
  194. package/esm2015/testing/src/private_export_testing.js +2 -3
  195. package/esm2015/testing/src/r3_test_bed.js +34 -27
  196. package/esm2015/testing/src/resolvers.js +9 -5
  197. package/esm2015/testing/src/test_bed.js +38 -34
  198. package/esm2015/testing/src/test_bed_common.js +142 -85
  199. package/esm2015/testing/src/test_compiler.js +2 -3
  200. package/esm2015/testing/src/testing.js +3 -3
  201. package/esm2015/testing/src/testing_internal.js +8 -9
  202. package/esm2015/testing/testing.js +1 -2
  203. package/esm5/core.js +1 -2
  204. package/esm5/index.js +1 -2
  205. package/esm5/public_api.js +1 -2
  206. package/esm5/src/application_init.js +1 -2
  207. package/esm5/src/application_module.js +1 -2
  208. package/esm5/src/application_ref.js +1 -2
  209. package/esm5/src/application_tokens.js +1 -2
  210. package/esm5/src/change_detection/change_detection.js +1 -2
  211. package/esm5/src/change_detection/change_detection_util.js +1 -2
  212. package/esm5/src/change_detection/change_detector_ref.js +1 -2
  213. package/esm5/src/change_detection/constants.js +1 -2
  214. package/esm5/src/change_detection/differs/default_iterable_differ.js +1 -2
  215. package/esm5/src/change_detection/differs/default_keyvalue_differ.js +1 -2
  216. package/esm5/src/change_detection/differs/iterable_differs.js +1 -2
  217. package/esm5/src/change_detection/differs/keyvalue_differs.js +1 -2
  218. package/esm5/src/change_detection/pipe_transform.js +1 -2
  219. package/esm5/src/change_detection.js +1 -2
  220. package/esm5/src/codegen_private_exports.js +1 -2
  221. package/esm5/src/console.js +1 -2
  222. package/esm5/src/core.js +1 -2
  223. package/esm5/src/core_private_export.js +1 -2
  224. package/esm5/src/core_render3_private_export.js +1 -2
  225. package/esm5/src/debug/debug_node.js +1 -2
  226. package/esm5/src/di/defs.js +1 -2
  227. package/esm5/src/di/forward_ref.js +1 -2
  228. package/esm5/src/di/injectable.js +1 -2
  229. package/esm5/src/di/injection_token.js +1 -2
  230. package/esm5/src/di/injector.js +7 -8
  231. package/esm5/src/di/injector_compatibility.js +30 -10
  232. package/esm5/src/di/metadata.js +1 -2
  233. package/esm5/src/di/provider.js +1 -2
  234. package/esm5/src/di/r3_injector.js +5 -6
  235. package/esm5/src/di/reflective_errors.js +1 -2
  236. package/esm5/src/di/reflective_injector.js +1 -2
  237. package/esm5/src/di/reflective_key.js +1 -2
  238. package/esm5/src/di/reflective_provider.js +1 -2
  239. package/esm5/src/di/scope.js +1 -2
  240. package/esm5/src/di/util.js +1 -2
  241. package/esm5/src/di.js +2 -3
  242. package/esm5/src/error_handler.js +1 -2
  243. package/esm5/src/errors.js +1 -2
  244. package/esm5/src/event_emitter.js +1 -2
  245. package/esm5/src/i18n/tokens.js +1 -2
  246. package/esm5/src/is_dev_mode.js +1 -2
  247. package/esm5/src/ivy_switch.js +1 -2
  248. package/esm5/src/linker/compiler.js +1 -2
  249. package/esm5/src/linker/component_factory.js +1 -2
  250. package/esm5/src/linker/component_factory_resolver.js +1 -2
  251. package/esm5/src/linker/element_ref.js +1 -2
  252. package/esm5/src/linker/ng_module_factory.js +1 -2
  253. package/esm5/src/linker/ng_module_factory_loader.js +1 -2
  254. package/esm5/src/linker/query_list.js +1 -2
  255. package/esm5/src/linker/system_js_ng_module_factory_loader.js +1 -2
  256. package/esm5/src/linker/template_ref.js +1 -2
  257. package/esm5/src/linker/view_container_ref.js +1 -2
  258. package/esm5/src/linker/view_ref.js +1 -2
  259. package/esm5/src/linker.js +1 -2
  260. package/esm5/src/metadata/di.js +1 -2
  261. package/esm5/src/metadata/directives.js +1 -2
  262. package/esm5/src/metadata/lifecycle_hooks.js +1 -2
  263. package/esm5/src/metadata/ng_module.js +1 -2
  264. package/esm5/src/metadata/resource_loading.js +1 -2
  265. package/esm5/src/metadata/view.js +1 -2
  266. package/esm5/src/metadata.js +1 -2
  267. package/esm5/src/platform_core_providers.js +1 -2
  268. package/esm5/src/profile/profile.js +1 -2
  269. package/esm5/src/profile/wtf_impl.js +1 -2
  270. package/esm5/src/r3_symbols.js +1 -2
  271. package/esm5/src/reflection/platform_reflection_capabilities.js +1 -2
  272. package/esm5/src/reflection/reflection.js +1 -2
  273. package/esm5/src/reflection/reflection_capabilities.js +1 -2
  274. package/esm5/src/reflection/reflector.js +1 -2
  275. package/esm5/src/reflection/types.js +1 -2
  276. package/esm5/src/render/api.js +1 -2
  277. package/esm5/src/render.js +1 -2
  278. package/esm5/src/render3/assert.js +1 -2
  279. package/esm5/src/render3/component.js +1 -2
  280. package/esm5/src/render3/component_ref.js +1 -2
  281. package/esm5/src/render3/context_discovery.js +1 -2
  282. package/esm5/src/render3/debug.js +1 -2
  283. package/esm5/src/render3/definition.js +1 -2
  284. package/esm5/src/render3/di.js +12 -13
  285. package/esm5/src/render3/di_setup.js +1 -2
  286. package/esm5/src/render3/discovery_utils.js +1 -2
  287. package/esm5/src/render3/errors.js +1 -2
  288. package/esm5/src/render3/features/inherit_definition_feature.js +1 -2
  289. package/esm5/src/render3/features/ng_onchanges_feature.js +1 -2
  290. package/esm5/src/render3/features/providers_feature.js +1 -2
  291. package/esm5/src/render3/fields.js +1 -2
  292. package/esm5/src/render3/global_utils.js +1 -2
  293. package/esm5/src/render3/global_utils_api.js +1 -2
  294. package/esm5/src/render3/hooks.js +1 -2
  295. package/esm5/src/render3/i18n.js +1 -2
  296. package/esm5/src/render3/index.js +1 -2
  297. package/esm5/src/render3/instructions.js +3 -3
  298. package/esm5/src/render3/interfaces/container.js +1 -2
  299. package/esm5/src/render3/interfaces/context.js +1 -2
  300. package/esm5/src/render3/interfaces/definition.js +1 -2
  301. package/esm5/src/render3/interfaces/i18n.js +1 -2
  302. package/esm5/src/render3/interfaces/injector.js +1 -2
  303. package/esm5/src/render3/interfaces/node.js +1 -2
  304. package/esm5/src/render3/interfaces/player.js +1 -2
  305. package/esm5/src/render3/interfaces/projection.js +1 -2
  306. package/esm5/src/render3/interfaces/query.js +1 -2
  307. package/esm5/src/render3/interfaces/renderer.js +1 -2
  308. package/esm5/src/render3/interfaces/sanitization.js +1 -2
  309. package/esm5/src/render3/interfaces/styling.js +1 -2
  310. package/esm5/src/render3/interfaces/view.js +1 -2
  311. package/esm5/src/render3/jit/compiler_facade.js +1 -2
  312. package/esm5/src/render3/jit/compiler_facade_interface.js +1 -2
  313. package/esm5/src/render3/jit/directive.js +1 -2
  314. package/esm5/src/render3/jit/environment.js +1 -2
  315. package/esm5/src/render3/jit/injectable.js +1 -2
  316. package/esm5/src/render3/jit/module.js +1 -2
  317. package/esm5/src/render3/jit/pipe.js +1 -2
  318. package/esm5/src/render3/jit/util.js +1 -2
  319. package/esm5/src/render3/metadata.js +1 -2
  320. package/esm5/src/render3/ng_dev_mode.js +1 -2
  321. package/esm5/src/render3/ng_module_ref.js +1 -2
  322. package/esm5/src/render3/node_assert.js +1 -2
  323. package/esm5/src/render3/node_manipulation.js +1 -2
  324. package/esm5/src/render3/node_selector_matcher.js +1 -2
  325. package/esm5/src/render3/pipe.js +1 -2
  326. package/esm5/src/render3/players.js +1 -2
  327. package/esm5/src/render3/pure_function.js +1 -2
  328. package/esm5/src/render3/query.js +1 -2
  329. package/esm5/src/render3/state.js +1 -2
  330. package/esm5/src/render3/styling/class_and_style_bindings.js +1 -2
  331. package/esm5/src/render3/styling/core_player_handler.js +1 -2
  332. package/esm5/src/render3/styling/player_factory.js +1 -2
  333. package/esm5/src/render3/styling/util.js +1 -2
  334. package/esm5/src/render3/tokens.js +1 -2
  335. package/esm5/src/render3/util.js +1 -2
  336. package/esm5/src/render3/view_engine_compatibility.js +3 -3
  337. package/esm5/src/render3/view_engine_compatibility_prebound.js +1 -2
  338. package/esm5/src/render3/view_ref.js +1 -2
  339. package/esm5/src/sanitization/bypass.js +1 -2
  340. package/esm5/src/sanitization/html_sanitizer.js +1 -2
  341. package/esm5/src/sanitization/inert_body.js +1 -2
  342. package/esm5/src/sanitization/sanitization.js +1 -2
  343. package/esm5/src/sanitization/security.js +1 -2
  344. package/esm5/src/sanitization/style_sanitizer.js +1 -2
  345. package/esm5/src/sanitization/url_sanitizer.js +1 -2
  346. package/esm5/src/testability/testability.js +1 -2
  347. package/esm5/src/type.js +1 -2
  348. package/esm5/src/util/decorators.js +1 -2
  349. package/esm5/src/util/lang.js +1 -2
  350. package/esm5/src/util/noop.js +1 -2
  351. package/esm5/src/util/property.js +1 -2
  352. package/esm5/src/util.js +1 -2
  353. package/esm5/src/version.js +2 -3
  354. package/esm5/src/view/element.js +1 -2
  355. package/esm5/src/view/entrypoint.js +1 -2
  356. package/esm5/src/view/errors.js +1 -2
  357. package/esm5/src/view/index.js +1 -2
  358. package/esm5/src/view/ng_content.js +1 -2
  359. package/esm5/src/view/ng_module.js +1 -2
  360. package/esm5/src/view/provider.js +1 -2
  361. package/esm5/src/view/pure_expression.js +1 -2
  362. package/esm5/src/view/query.js +1 -2
  363. package/esm5/src/view/refs.js +5 -5
  364. package/esm5/src/view/services.js +1 -2
  365. package/esm5/src/view/text.js +1 -2
  366. package/esm5/src/view/types.js +1 -2
  367. package/esm5/src/view/util.js +1 -2
  368. package/esm5/src/view/view.js +1 -2
  369. package/esm5/src/view/view_attach.js +1 -2
  370. package/esm5/src/zone/ng_zone.js +1 -2
  371. package/esm5/src/zone.js +1 -2
  372. package/esm5/testing/index.js +1 -2
  373. package/esm5/testing/public_api.js +1 -2
  374. package/esm5/testing/src/async.js +1 -2
  375. package/esm5/testing/src/async_fallback.js +1 -2
  376. package/esm5/testing/src/async_test_completer.js +1 -2
  377. package/esm5/testing/src/before_each.js +1 -2
  378. package/esm5/testing/src/component_fixture.js +1 -2
  379. package/esm5/testing/src/fake_async.js +1 -2
  380. package/esm5/testing/src/fake_async_fallback.js +1 -2
  381. package/esm5/testing/src/lang_utils.js +1 -2
  382. package/esm5/testing/src/logger.js +1 -2
  383. package/esm5/testing/src/metadata_override.js +1 -2
  384. package/esm5/testing/src/metadata_overrider.js +1 -2
  385. package/esm5/testing/src/ng_zone_mock.js +1 -2
  386. package/esm5/testing/src/private_export_testing.js +1 -2
  387. package/esm5/testing/src/r3_test_bed.js +1 -2
  388. package/esm5/testing/src/resolvers.js +1 -2
  389. package/esm5/testing/src/test_bed.js +1 -2
  390. package/esm5/testing/src/test_bed_common.js +1 -2
  391. package/esm5/testing/src/test_compiler.js +1 -2
  392. package/esm5/testing/src/testing.js +1 -2
  393. package/esm5/testing/src/testing_internal.js +1 -2
  394. package/esm5/testing/testing.js +1 -2
  395. package/fesm2015/core.js +2040 -1354
  396. package/fesm2015/core.js.map +1 -1
  397. package/fesm2015/testing.js +123 -89
  398. package/fesm2015/testing.js.map +1 -1
  399. package/fesm5/core.js +55 -34
  400. package/fesm5/core.js.map +1 -1
  401. package/fesm5/testing.js +1 -1
  402. package/fesm5/testing.js.map +1 -1
  403. package/package.json +1 -1
  404. package/src/di/injector_compatibility.d.ts +1 -1
  405. package/testing.d.ts +5 -0
  406. package/npm_package.es6/external/ngdeps/node_modules/tslib/tslib.d.ts +0 -33
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v7.1.0
2
+ * @license Angular v7.1.4
3
3
  * (c) 2010-2018 Google, Inc. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -8,7 +8,7 @@ import { RendererFactory2, getDebugNode, ɵstringify, Component, Directive, NgMo
8
8
 
9
9
  /**
10
10
  * @fileoverview added by tsickle
11
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
11
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
12
12
  */
13
13
  /**
14
14
  * @license
@@ -18,7 +18,7 @@ import { RendererFactory2, getDebugNode, ɵstringify, Component, Directive, NgMo
18
18
  * found in the LICENSE file at https://angular.io/license
19
19
  */
20
20
  /** @type {?} */
21
- const _global = /** @type {?} */ ((typeof window === 'undefined' ? global : window));
21
+ const _global = (/** @type {?} */ ((typeof window === 'undefined' ? global : window)));
22
22
  /**
23
23
  * Wraps a test function in an asynchronous test zone. The test will automatically
24
24
  * complete when all asynchronous calls within this zone are done. Can be used
@@ -52,7 +52,7 @@ function asyncFallback(fn) {
52
52
  }
53
53
  runInTestZone(fn, this, done, (err) => {
54
54
  if (typeof err === 'string') {
55
- return done.fail(new Error(/** @type {?} */ (err)));
55
+ return done.fail(new Error((/** @type {?} */ (err))));
56
56
  }
57
57
  else {
58
58
  done.fail(err);
@@ -81,13 +81,13 @@ function runInTestZone(fn, context, finishCallback, failCallback) {
81
81
  /** @type {?} */
82
82
  const currentZone = Zone.current;
83
83
  /** @type {?} */
84
- const AsyncTestZoneSpec = (/** @type {?} */ (Zone))['AsyncTestZoneSpec'];
84
+ const AsyncTestZoneSpec = ((/** @type {?} */ (Zone)))['AsyncTestZoneSpec'];
85
85
  if (AsyncTestZoneSpec === undefined) {
86
86
  throw new Error('AsyncTestZoneSpec is needed for the async() test helper but could not be found. ' +
87
87
  'Please make sure that your environment includes zone.js/dist/async-test.js');
88
88
  }
89
89
  /** @type {?} */
90
- const ProxyZoneSpec = /** @type {?} */ ((/** @type {?} */ (Zone))['ProxyZoneSpec']);
90
+ const ProxyZoneSpec = (/** @type {?} */ (((/** @type {?} */ (Zone)))['ProxyZoneSpec']));
91
91
  if (ProxyZoneSpec === undefined) {
92
92
  throw new Error('ProxyZoneSpec is needed for the async() test helper but could not be found. ' +
93
93
  'Please make sure that your environment includes zone.js/dist/proxy.js');
@@ -95,6 +95,8 @@ function runInTestZone(fn, context, finishCallback, failCallback) {
95
95
  /** @type {?} */
96
96
  const proxyZoneSpec = ProxyZoneSpec.get();
97
97
  ProxyZoneSpec.assertPresent();
98
+ // We need to create the AsyncTestZoneSpec outside the ProxyZone.
99
+ // If we do it in ProxyZone then we will get to infinite recursion.
98
100
  /** @type {?} */
99
101
  const proxyZone = Zone.current.getZoneWith('ProxyZoneSpec');
100
102
  /** @type {?} */
@@ -127,7 +129,7 @@ function runInTestZone(fn, context, finishCallback, failCallback) {
127
129
 
128
130
  /**
129
131
  * @fileoverview added by tsickle
130
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
132
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
131
133
  */
132
134
  /**
133
135
  * Wraps a test function in an asynchronous test zone. The test will automatically
@@ -170,7 +172,7 @@ function async(fn) {
170
172
 
171
173
  /**
172
174
  * @fileoverview added by tsickle
173
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
175
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
174
176
  */
175
177
  /**
176
178
  * Fixture for debugging and testing a component.
@@ -198,7 +200,7 @@ class ComponentFixture {
198
200
  this._onErrorSubscription = null;
199
201
  this.changeDetectorRef = componentRef.changeDetectorRef;
200
202
  this.elementRef = componentRef.location;
201
- this.debugElement = /** @type {?} */ (getDebugNode(this.elementRef.nativeElement));
203
+ this.debugElement = (/** @type {?} */ (getDebugNode(this.elementRef.nativeElement)));
202
204
  this.componentInstance = componentRef.instance;
203
205
  this.nativeElement = this.elementRef.nativeElement;
204
206
  this.componentRef = componentRef;
@@ -229,7 +231,7 @@ class ComponentFixture {
229
231
  scheduleMicroTask(() => {
230
232
  if (!ngZone.hasPendingMacrotasks) {
231
233
  if (this._promise !== null) {
232
- /** @type {?} */ ((this._resolve))(true);
234
+ (/** @type {?} */ (this._resolve))(true);
233
235
  this._resolve = null;
234
236
  this._promise = null;
235
237
  }
@@ -293,7 +295,7 @@ class ComponentFixture {
293
295
  * yet.
294
296
  * @return {?}
295
297
  */
296
- isStable() { return this._isStable && !/** @type {?} */ ((this.ngZone)).hasPendingMacrotasks; }
298
+ isStable() { return this._isStable && !(/** @type {?} */ (this.ngZone)).hasPendingMacrotasks; }
297
299
  /**
298
300
  * Get a promise that resolves when the fixture is stable.
299
301
  *
@@ -320,7 +322,7 @@ class ComponentFixture {
320
322
  if (this._renderer === undefined) {
321
323
  this._renderer = this.componentRef.injector.get(RendererFactory2, null);
322
324
  }
323
- return /** @type {?} */ (this._renderer);
325
+ return (/** @type {?} */ (this._renderer));
324
326
  }
325
327
  /**
326
328
  * Get a promise that resolves when the ui state is stable following animations.
@@ -371,7 +373,7 @@ function scheduleMicroTask(fn) {
371
373
 
372
374
  /**
373
375
  * @fileoverview added by tsickle
374
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
376
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
375
377
  */
376
378
  /**
377
379
  * @license
@@ -380,10 +382,11 @@ function scheduleMicroTask(fn) {
380
382
  * Use of this source code is governed by an MIT-style license that can be
381
383
  * found in the LICENSE file at https://angular.io/license
382
384
  */
383
- /** *
385
+ /**
384
386
  * fakeAsync has been moved to zone.js
385
387
  * this file is for fallback in case old version of zone.js is used
386
- @type {?} */
388
+ * @type {?}
389
+ */
387
390
  const _Zone = typeof Zone !== 'undefined' ? Zone : null;
388
391
  /** @type {?} */
389
392
  const FakeAsyncTestZoneSpec = _Zone && _Zone['FakeAsyncTestZoneSpec'];
@@ -530,7 +533,7 @@ function flushMicrotasksFallback() {
530
533
 
531
534
  /**
532
535
  * @fileoverview added by tsickle
533
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
536
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
534
537
  */
535
538
  /** @type {?} */
536
539
  const _Zone$1 = typeof Zone !== 'undefined' ? Zone : null;
@@ -650,7 +653,7 @@ function flushMicrotasks() {
650
653
 
651
654
  /**
652
655
  * @fileoverview added by tsickle
653
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
656
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
654
657
  */
655
658
  /**
656
659
  * @license
@@ -688,7 +691,7 @@ class AsyncTestCompleter {
688
691
 
689
692
  /**
690
693
  * @fileoverview added by tsickle
691
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
694
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
692
695
  */
693
696
  /** @type {?} */
694
697
  let _nextReferenceId = 0;
@@ -709,7 +712,7 @@ class MetadataOverrider {
709
712
  /** @type {?} */
710
713
  const props = {};
711
714
  if (oldMetadata) {
712
- _valueProps(oldMetadata).forEach((prop) => props[prop] = (/** @type {?} */ (oldMetadata))[prop]);
715
+ _valueProps(oldMetadata).forEach((prop) => props[prop] = ((/** @type {?} */ (oldMetadata)))[prop]);
713
716
  }
714
717
  if (override.set) {
715
718
  if (override.remove || override.add) {
@@ -723,7 +726,7 @@ class MetadataOverrider {
723
726
  if (override.add) {
724
727
  addMetadata(props, override.add);
725
728
  }
726
- return new metadataClass(/** @type {?} */ (props));
729
+ return new metadataClass((/** @type {?} */ (props)));
727
730
  }
728
731
  }
729
732
  /**
@@ -830,6 +833,7 @@ function _valueProps(obj) {
830
833
  props.push(prop);
831
834
  }
832
835
  });
836
+ // getters
833
837
  /** @type {?} */
834
838
  let proto = obj;
835
839
  while (proto = Object.getPrototypeOf(proto)) {
@@ -846,7 +850,7 @@ function _valueProps(obj) {
846
850
 
847
851
  /**
848
852
  * @fileoverview added by tsickle
849
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
853
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
850
854
  */
851
855
  /** @type {?} */
852
856
  const reflection = new ɵReflectionCapabilities();
@@ -925,7 +929,7 @@ class NgModuleResolver extends OverrideResolver {
925
929
 
926
930
  /**
927
931
  * @fileoverview added by tsickle
928
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
932
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
929
933
  */
930
934
  /**
931
935
  * An abstract class for inserting the root test component element in a platform independent way.
@@ -939,18 +943,20 @@ class TestComponentRenderer {
939
943
  */
940
944
  insertRootElement(rootElementId) { }
941
945
  }
942
- /** *
946
+ /**
943
947
  * \@publicApi
944
- @type {?} */
948
+ * @type {?}
949
+ */
945
950
  const ComponentFixtureAutoDetect = new InjectionToken('ComponentFixtureAutoDetect');
946
- /** *
951
+ /**
947
952
  * \@publicApi
948
- @type {?} */
953
+ * @type {?}
954
+ */
949
955
  const ComponentFixtureNoNgZone = new InjectionToken('ComponentFixtureNoNgZone');
950
956
 
951
957
  /**
952
958
  * @fileoverview added by tsickle
953
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
959
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
954
960
  */
955
961
  /** @type {?} */
956
962
  let _nextRootElementId = 0;
@@ -967,20 +973,22 @@ let _nextRootElementId = 0;
967
973
  class TestBedRender3 {
968
974
  constructor() {
969
975
  // Properties
970
- this.platform = /** @type {?} */ ((null));
971
- this.ngModule = /** @type {?} */ ((null));
976
+ this.platform = (/** @type {?} */ (null));
977
+ this.ngModule = (/** @type {?} */ (null));
978
+ // metadata overrides
972
979
  this._moduleOverrides = [];
973
980
  this._componentOverrides = [];
974
981
  this._directiveOverrides = [];
975
982
  this._pipeOverrides = [];
976
983
  this._providerOverrides = [];
977
984
  this._rootProviderOverrides = [];
985
+ // test module configuration
978
986
  this._providers = [];
979
987
  this._declarations = [];
980
988
  this._imports = [];
981
989
  this._schemas = [];
982
990
  this._activeFixtures = [];
983
- this._moduleRef = /** @type {?} */ ((null));
991
+ this._moduleRef = (/** @type {?} */ (null));
984
992
  this._instantiated = false;
985
993
  }
986
994
  /**
@@ -1019,7 +1027,7 @@ class TestBedRender3 {
1019
1027
  */
1020
1028
  static configureCompiler(config) {
1021
1029
  _getTestBedRender3().configureCompiler(config);
1022
- return /** @type {?} */ ((TestBedRender3));
1030
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1023
1031
  }
1024
1032
  /**
1025
1033
  * Allows overriding default providers, directives, pipes, modules of the test injector,
@@ -1029,7 +1037,7 @@ class TestBedRender3 {
1029
1037
  */
1030
1038
  static configureTestingModule(moduleDef) {
1031
1039
  _getTestBedRender3().configureTestingModule(moduleDef);
1032
- return /** @type {?} */ ((TestBedRender3));
1040
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1033
1041
  }
1034
1042
  /**
1035
1043
  * Compile components with a `templateUrl` for the test's NgModule.
@@ -1045,7 +1053,7 @@ class TestBedRender3 {
1045
1053
  */
1046
1054
  static overrideModule(ngModule, override) {
1047
1055
  _getTestBedRender3().overrideModule(ngModule, override);
1048
- return /** @type {?} */ ((TestBedRender3));
1056
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1049
1057
  }
1050
1058
  /**
1051
1059
  * @param {?} component
@@ -1054,7 +1062,7 @@ class TestBedRender3 {
1054
1062
  */
1055
1063
  static overrideComponent(component, override) {
1056
1064
  _getTestBedRender3().overrideComponent(component, override);
1057
- return /** @type {?} */ ((TestBedRender3));
1065
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1058
1066
  }
1059
1067
  /**
1060
1068
  * @param {?} directive
@@ -1063,7 +1071,7 @@ class TestBedRender3 {
1063
1071
  */
1064
1072
  static overrideDirective(directive, override) {
1065
1073
  _getTestBedRender3().overrideDirective(directive, override);
1066
- return /** @type {?} */ ((TestBedRender3));
1074
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1067
1075
  }
1068
1076
  /**
1069
1077
  * @param {?} pipe
@@ -1072,7 +1080,7 @@ class TestBedRender3 {
1072
1080
  */
1073
1081
  static overridePipe(pipe, override) {
1074
1082
  _getTestBedRender3().overridePipe(pipe, override);
1075
- return /** @type {?} */ ((TestBedRender3));
1083
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1076
1084
  }
1077
1085
  /**
1078
1086
  * @param {?} component
@@ -1080,8 +1088,8 @@ class TestBedRender3 {
1080
1088
  * @return {?}
1081
1089
  */
1082
1090
  static overrideTemplate(component, template) {
1083
- _getTestBedRender3().overrideComponent(component, { set: { template, templateUrl: /** @type {?} */ ((null)) } });
1084
- return /** @type {?} */ ((TestBedRender3));
1091
+ _getTestBedRender3().overrideComponent(component, { set: { template, templateUrl: (/** @type {?} */ (null)) } });
1092
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1085
1093
  }
1086
1094
  /**
1087
1095
  * Overrides the template of the given component, compiling the template
@@ -1094,7 +1102,7 @@ class TestBedRender3 {
1094
1102
  */
1095
1103
  static overrideTemplateUsingTestingModule(component, template) {
1096
1104
  _getTestBedRender3().overrideTemplateUsingTestingModule(component, template);
1097
- return /** @type {?} */ ((TestBedRender3));
1105
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1098
1106
  }
1099
1107
  /**
1100
1108
  * @param {?} component
@@ -1111,7 +1119,7 @@ class TestBedRender3 {
1111
1119
  */
1112
1120
  static overrideProvider(token, provider) {
1113
1121
  _getTestBedRender3().overrideProvider(token, provider);
1114
- return /** @type {?} */ ((TestBedRender3));
1122
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1115
1123
  }
1116
1124
  /**
1117
1125
  * @param {?} token
@@ -1142,7 +1150,7 @@ class TestBedRender3 {
1142
1150
  */
1143
1151
  static resetTestingModule() {
1144
1152
  _getTestBedRender3().resetTestingModule();
1145
- return /** @type {?} */ ((TestBedRender3));
1153
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedRender3))));
1146
1154
  }
1147
1155
  /**
1148
1156
  * Initialize the environment for testing with a compiler factory, a PlatformRef, and an
@@ -1176,8 +1184,8 @@ class TestBedRender3 {
1176
1184
  */
1177
1185
  resetTestEnvironment() {
1178
1186
  this.resetTestingModule();
1179
- this.platform = /** @type {?} */ ((null));
1180
- this.ngModule = /** @type {?} */ ((null));
1187
+ this.platform = (/** @type {?} */ (null));
1188
+ this.ngModule = (/** @type {?} */ (null));
1181
1189
  }
1182
1190
  /**
1183
1191
  * @return {?}
@@ -1195,7 +1203,7 @@ class TestBedRender3 {
1195
1203
  this._declarations = [];
1196
1204
  this._imports = [];
1197
1205
  this._schemas = [];
1198
- this._moduleRef = /** @type {?} */ ((null));
1206
+ this._moduleRef = (/** @type {?} */ (null));
1199
1207
  this._instantiated = false;
1200
1208
  this._activeFixtures.forEach((fixture) => {
1201
1209
  try {
@@ -1351,7 +1359,7 @@ class TestBedRender3 {
1351
1359
  const rootElId = `root${_nextRootElementId++}`;
1352
1360
  testComponentRenderer.insertRootElement(rootElId);
1353
1361
  /** @nocollapse @type {?} */
1354
- const componentDef = (/** @type {?} */ (type)).ngComponentDef;
1362
+ const componentDef = ((/** @type {?} */ (type))).ngComponentDef;
1355
1363
  if (!componentDef) {
1356
1364
  throw new Error(`It looks like '${ɵstringify(type)}' has not been IVY compiled - it has no 'ngComponentDef' field`);
1357
1365
  }
@@ -1374,6 +1382,7 @@ class TestBedRender3 {
1374
1382
  this._activeFixtures.push(fixture);
1375
1383
  return fixture;
1376
1384
  }
1385
+ // internal methods
1377
1386
  /**
1378
1387
  * @return {?}
1379
1388
  */
@@ -1391,6 +1400,7 @@ class TestBedRender3 {
1391
1400
  this._moduleRef = new ɵRender3NgModuleRef(testModuleType, parentInjector);
1392
1401
  this._instantiated = true;
1393
1402
  }
1403
+ // creates resolvers taking overrides into account
1394
1404
  /**
1395
1405
  * @return {?}
1396
1406
  */
@@ -1465,6 +1475,7 @@ let testBed;
1465
1475
  function _getTestBedRender3() {
1466
1476
  return testBed = testBed || new TestBedRender3();
1467
1477
  }
1478
+ // Module compiler
1468
1479
  /** @type {?} */
1469
1480
  const EMPTY_ARRAY = [];
1470
1481
  /**
@@ -1505,9 +1516,10 @@ function compileNgModule(moduleType, resolvers) {
1505
1516
  return;
1506
1517
  }
1507
1518
  });
1519
+ // Compile transitive modules, components, directives and pipes
1508
1520
  /** @type {?} */
1509
1521
  const transitiveScope = transitiveScopesFor(moduleType, resolvers);
1510
- compiledComponents.forEach(cmp => ɵpatchComponentDefWithScope((/** @type {?} */ (cmp)).ngComponentDef, transitiveScope));
1522
+ compiledComponents.forEach(cmp => ɵpatchComponentDefWithScope(((/** @type {?} */ (cmp))).ngComponentDef, transitiveScope));
1511
1523
  }
1512
1524
  /**
1513
1525
  * Compute the pair of transitive scopes (compilation scope and exported scope) for a given module.
@@ -1542,7 +1554,7 @@ function transitiveScopesFor(moduleType, resolvers) {
1542
1554
  };
1543
1555
  def.declarations.forEach(declared => {
1544
1556
  /** @type {?} */
1545
- const declaredWithDefs = /** @type {?} */ (declared);
1557
+ const declaredWithDefs = (/** @type {?} */ (declared));
1546
1558
  if (declaredWithDefs.ngPipeDef !== undefined) {
1547
1559
  scopes.compilation.pipes.add(declared);
1548
1560
  }
@@ -1559,6 +1571,8 @@ function transitiveScopesFor(moduleType, resolvers) {
1559
1571
  else {
1560
1572
  compileNgModule(imported, resolvers);
1561
1573
  }
1574
+ // When this module imports another, the imported module's exported directives and pipes are
1575
+ // added to the compilation scope of this module.
1562
1576
  /** @type {?} */
1563
1577
  const importedScope = transitiveScopesFor(imported, resolvers);
1564
1578
  importedScope.exported.directives.forEach(entry => scopes.compilation.directives.add(entry));
@@ -1566,10 +1580,12 @@ function transitiveScopesFor(moduleType, resolvers) {
1566
1580
  });
1567
1581
  def.exports.forEach((exported) => {
1568
1582
  /** @type {?} */
1569
- const exportedTyped = /** @type {?} */ (exported);
1583
+ const exportedTyped = (/** @type {?} */ (exported));
1570
1584
  // Either the type is a module, a pipe, or a component/directive (which may not have an
1571
1585
  // ngComponentDef as it might be compiled asynchronously).
1572
1586
  if (isNgModule(exportedTyped)) {
1587
+ // When this module exports another, the exported module's exported directives and pipes are
1588
+ // added to both the compilation and exported scopes of this module.
1573
1589
  /** @type {?} */
1574
1590
  const exportedScope = transitiveScopesFor(exportedTyped, resolvers);
1575
1591
  exportedScope.exported.directives.forEach(entry => {
@@ -1615,12 +1631,12 @@ function flatten(values) {
1615
1631
  * @return {?}
1616
1632
  */
1617
1633
  function isNgModule(value) {
1618
- return (/** @type {?} */ (value)).ngModuleDef !== undefined;
1634
+ return ((/** @type {?} */ (value))).ngModuleDef !== undefined;
1619
1635
  }
1620
1636
 
1621
1637
  /**
1622
1638
  * @fileoverview added by tsickle
1623
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1639
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
1624
1640
  */
1625
1641
  /**
1626
1642
  * @return {?}
@@ -1708,12 +1724,13 @@ class TestingCompilerFactory {
1708
1724
 
1709
1725
  /**
1710
1726
  * @fileoverview added by tsickle
1711
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1727
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
1712
1728
  */
1713
1729
  /** @type {?} */
1714
1730
  const UNDEFINED = new Object();
1715
1731
  /** @type {?} */
1716
1732
  let _nextRootElementId$1 = 0;
1733
+ // WARNING: interface has both a type and a value, skipping emit
1717
1734
  /**
1718
1735
  * \@description
1719
1736
  * Configures and initializes environment for unit testing and provides methods for
@@ -1727,9 +1744,9 @@ let _nextRootElementId$1 = 0;
1727
1744
  class TestBedViewEngine {
1728
1745
  constructor() {
1729
1746
  this._instantiated = false;
1730
- this._compiler = /** @type {?} */ ((null));
1731
- this._moduleRef = /** @type {?} */ ((null));
1732
- this._moduleFactory = /** @type {?} */ ((null));
1747
+ this._compiler = (/** @type {?} */ (null));
1748
+ this._moduleRef = (/** @type {?} */ (null));
1749
+ this._moduleFactory = (/** @type {?} */ (null));
1733
1750
  this._compilerOptions = [];
1734
1751
  this._moduleOverrides = [];
1735
1752
  this._componentOverrides = [];
@@ -1745,8 +1762,8 @@ class TestBedViewEngine {
1745
1762
  this._templateOverrides = [];
1746
1763
  this._isRoot = true;
1747
1764
  this._rootProviderOverrides = [];
1748
- this.platform = /** @type {?} */ ((null));
1749
- this.ngModule = /** @type {?} */ ((null));
1765
+ this.platform = (/** @type {?} */ (null));
1766
+ this.ngModule = (/** @type {?} */ (null));
1750
1767
  }
1751
1768
  /**
1752
1769
  * Initialize the environment for testing with a compiler factory, a PlatformRef, and an
@@ -1783,7 +1800,7 @@ class TestBedViewEngine {
1783
1800
  */
1784
1801
  static resetTestingModule() {
1785
1802
  _getTestBedViewEngine().resetTestingModule();
1786
- return /** @type {?} */ ((TestBedViewEngine));
1803
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1787
1804
  }
1788
1805
  /**
1789
1806
  * Allows overriding default compiler providers and settings
@@ -1793,7 +1810,7 @@ class TestBedViewEngine {
1793
1810
  */
1794
1811
  static configureCompiler(config) {
1795
1812
  _getTestBedViewEngine().configureCompiler(config);
1796
- return /** @type {?} */ ((TestBedViewEngine));
1813
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1797
1814
  }
1798
1815
  /**
1799
1816
  * Allows overriding default providers, directives, pipes, modules of the test injector,
@@ -1803,7 +1820,7 @@ class TestBedViewEngine {
1803
1820
  */
1804
1821
  static configureTestingModule(moduleDef) {
1805
1822
  _getTestBedViewEngine().configureTestingModule(moduleDef);
1806
- return /** @type {?} */ ((TestBedViewEngine));
1823
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1807
1824
  }
1808
1825
  /**
1809
1826
  * Compile components with a `templateUrl` for the test's NgModule.
@@ -1819,7 +1836,7 @@ class TestBedViewEngine {
1819
1836
  */
1820
1837
  static overrideModule(ngModule, override) {
1821
1838
  _getTestBedViewEngine().overrideModule(ngModule, override);
1822
- return /** @type {?} */ ((TestBedViewEngine));
1839
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1823
1840
  }
1824
1841
  /**
1825
1842
  * @param {?} component
@@ -1828,7 +1845,7 @@ class TestBedViewEngine {
1828
1845
  */
1829
1846
  static overrideComponent(component, override) {
1830
1847
  _getTestBedViewEngine().overrideComponent(component, override);
1831
- return /** @type {?} */ ((TestBedViewEngine));
1848
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1832
1849
  }
1833
1850
  /**
1834
1851
  * @param {?} directive
@@ -1837,7 +1854,7 @@ class TestBedViewEngine {
1837
1854
  */
1838
1855
  static overrideDirective(directive, override) {
1839
1856
  _getTestBedViewEngine().overrideDirective(directive, override);
1840
- return /** @type {?} */ ((TestBedViewEngine));
1857
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1841
1858
  }
1842
1859
  /**
1843
1860
  * @param {?} pipe
@@ -1846,7 +1863,7 @@ class TestBedViewEngine {
1846
1863
  */
1847
1864
  static overridePipe(pipe, override) {
1848
1865
  _getTestBedViewEngine().overridePipe(pipe, override);
1849
- return /** @type {?} */ ((TestBedViewEngine));
1866
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1850
1867
  }
1851
1868
  /**
1852
1869
  * @param {?} component
@@ -1854,8 +1871,8 @@ class TestBedViewEngine {
1854
1871
  * @return {?}
1855
1872
  */
1856
1873
  static overrideTemplate(component, template) {
1857
- _getTestBedViewEngine().overrideComponent(component, { set: { template, templateUrl: /** @type {?} */ ((null)) } });
1858
- return /** @type {?} */ ((TestBedViewEngine));
1874
+ _getTestBedViewEngine().overrideComponent(component, { set: { template, templateUrl: (/** @type {?} */ (null)) } });
1875
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1859
1876
  }
1860
1877
  /**
1861
1878
  * Overrides the template of the given component, compiling the template
@@ -1868,7 +1885,7 @@ class TestBedViewEngine {
1868
1885
  */
1869
1886
  static overrideTemplateUsingTestingModule(component, template) {
1870
1887
  _getTestBedViewEngine().overrideTemplateUsingTestingModule(component, template);
1871
- return /** @type {?} */ ((TestBedViewEngine));
1888
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1872
1889
  }
1873
1890
  /**
1874
1891
  * @param {?} token
@@ -1876,8 +1893,8 @@ class TestBedViewEngine {
1876
1893
  * @return {?}
1877
1894
  */
1878
1895
  static overrideProvider(token, provider) {
1879
- _getTestBedViewEngine().overrideProvider(token, /** @type {?} */ (provider));
1880
- return /** @type {?} */ ((TestBedViewEngine));
1896
+ _getTestBedViewEngine().overrideProvider(token, (/** @type {?} */ (provider)));
1897
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1881
1898
  }
1882
1899
  /**
1883
1900
  * @param {?} token
@@ -1885,8 +1902,8 @@ class TestBedViewEngine {
1885
1902
  * @return {?}
1886
1903
  */
1887
1904
  static deprecatedOverrideProvider(token, provider) {
1888
- _getTestBedViewEngine().deprecatedOverrideProvider(token, /** @type {?} */ (provider));
1889
- return /** @type {?} */ ((TestBedViewEngine));
1905
+ _getTestBedViewEngine().deprecatedOverrideProvider(token, (/** @type {?} */ (provider)));
1906
+ return (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
1890
1907
  }
1891
1908
  /**
1892
1909
  * @param {?} token
@@ -1939,8 +1956,8 @@ class TestBedViewEngine {
1939
1956
  */
1940
1957
  resetTestEnvironment() {
1941
1958
  this.resetTestingModule();
1942
- this.platform = /** @type {?} */ ((null));
1943
- this.ngModule = /** @type {?} */ ((null));
1959
+ this.platform = (/** @type {?} */ (null));
1960
+ this.ngModule = (/** @type {?} */ (null));
1944
1961
  this._testEnvAotSummaries = () => [];
1945
1962
  }
1946
1963
  /**
@@ -1950,15 +1967,15 @@ class TestBedViewEngine {
1950
1967
  ɵclearOverrides();
1951
1968
  this._aotSummaries = [];
1952
1969
  this._templateOverrides = [];
1953
- this._compiler = /** @type {?} */ ((null));
1970
+ this._compiler = (/** @type {?} */ (null));
1954
1971
  this._moduleOverrides = [];
1955
1972
  this._componentOverrides = [];
1956
1973
  this._directiveOverrides = [];
1957
1974
  this._pipeOverrides = [];
1958
1975
  this._isRoot = true;
1959
1976
  this._rootProviderOverrides = [];
1960
- this._moduleRef = /** @type {?} */ ((null));
1961
- this._moduleFactory = /** @type {?} */ ((null));
1977
+ this._moduleRef = (/** @type {?} */ (null));
1978
+ this._moduleFactory = (/** @type {?} */ (null));
1962
1979
  this._compilerOptions = [];
1963
1980
  this._providers = [];
1964
1981
  this._declarations = [];
@@ -2066,7 +2083,7 @@ class TestBedViewEngine {
2066
2083
  this._moduleRef = this._moduleFactory.create(ngZoneInjector);
2067
2084
  // ApplicationInitStatus.runInitializers() is marked @internal to core. So casting to any
2068
2085
  // before accessing it.
2069
- (/** @type {?} */ (this._moduleRef.injector.get(ApplicationInitStatus))).runInitializers();
2086
+ ((/** @type {?} */ (this._moduleRef.injector.get(ApplicationInitStatus)))).runInitializers();
2070
2087
  this._instantiated = true;
2071
2088
  }
2072
2089
  /**
@@ -2137,6 +2154,8 @@ class TestBedViewEngine {
2137
2154
  if (token === TestBed) {
2138
2155
  return this;
2139
2156
  }
2157
+ // Tests can inject things from the ng module and from the compiler,
2158
+ // but the ng module can't inject things from the compiler and vice versa.
2140
2159
  /** @type {?} */
2141
2160
  const result = this._moduleRef.injector.get(token, UNDEFINED);
2142
2161
  return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue) : result;
@@ -2203,7 +2222,7 @@ class TestBedViewEngine {
2203
2222
  * @return {?}
2204
2223
  */
2205
2224
  deprecatedOverrideProvider(token, provider) {
2206
- this.overrideProviderImpl(token, provider, /* deprecated */ /* deprecated */ true);
2225
+ this.overrideProviderImpl(token, provider, /* deprecated */ true);
2207
2226
  }
2208
2227
  /**
2209
2228
  * @param {?} token
@@ -2309,7 +2328,7 @@ class TestBedViewEngine {
2309
2328
  return fixture;
2310
2329
  }
2311
2330
  }
2312
- /** *
2331
+ /**
2313
2332
  * \@description
2314
2333
  * Configures and initializes environment for unit testing and provides methods for
2315
2334
  * creating components and services in unit tests.
@@ -2320,15 +2339,17 @@ class TestBedViewEngine {
2320
2339
  * according to the compiler used.
2321
2340
  *
2322
2341
  * \@publicApi
2323
- @type {?} */
2324
- const TestBed = ɵivyEnabled ? /** @type {?} */ ((TestBedRender3)) : /** @type {?} */ ((TestBedViewEngine));
2325
- /** *
2342
+ * @type {?}
2343
+ */
2344
+ const TestBed = ɵivyEnabled ? (/** @type {?} */ ((/** @type {?} */ (TestBedRender3)))) : (/** @type {?} */ ((/** @type {?} */ (TestBedViewEngine))));
2345
+ /**
2326
2346
  * Returns a singleton of the applicable `TestBed`.
2327
2347
  *
2328
2348
  * It will be either an instance of `TestBedViewEngine` or `TestBedRender3`.
2329
2349
  *
2330
2350
  * \@publicApi
2331
- @type {?} */
2351
+ * @type {?}
2352
+ */
2332
2353
  const getTestBed = ɵivyEnabled ? _getTestBedRender3 : _getTestBedViewEngine;
2333
2354
  /** @type {?} */
2334
2355
  let testBed$1;
@@ -2443,10 +2464,10 @@ function withModule(moduleDef, fn) {
2443
2464
 
2444
2465
  /**
2445
2466
  * @fileoverview added by tsickle
2446
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2467
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
2447
2468
  */
2448
2469
  /** @type {?} */
2449
- const _global$1 = /** @type {?} */ ((typeof window === 'undefined' ? global : window));
2470
+ const _global$1 = (/** @type {?} */ ((typeof window === 'undefined' ? global : window)));
2450
2471
  // Reset the test providers and the fake async zone before each test.
2451
2472
  if (_global$1.beforeEach) {
2452
2473
  _global$1.beforeEach(() => {
@@ -2454,28 +2475,41 @@ if (_global$1.beforeEach) {
2454
2475
  resetFakeAsyncZone();
2455
2476
  });
2456
2477
  }
2478
+ // TODO(juliemr): remove this, only used because we need to export something to have compilation
2479
+ // work.
2457
2480
  /** @type {?} */
2458
2481
  const __core_private_testing_placeholder__ = '';
2459
2482
 
2460
2483
  /**
2461
2484
  * @fileoverview added by tsickle
2462
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2485
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
2486
+ */
2487
+ /**
2488
+ * @license
2489
+ * Copyright Google Inc. All Rights Reserved.
2490
+ *
2491
+ * Use of this source code is governed by an MIT-style license that can be
2492
+ * found in the LICENSE file at https://angular.io/license
2493
+ */
2494
+
2495
+ /**
2496
+ * @fileoverview added by tsickle
2497
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
2463
2498
  */
2464
2499
 
2465
2500
  /**
2466
2501
  * @fileoverview added by tsickle
2467
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2502
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
2468
2503
  */
2469
2504
 
2470
2505
  /**
2471
2506
  * @fileoverview added by tsickle
2472
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2507
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
2473
2508
  */
2474
- // This file only reexports content of the `src` folder. Keep it that way.
2475
2509
 
2476
2510
  /**
2477
2511
  * @fileoverview added by tsickle
2478
- * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
2512
+ * @suppress {checkTypes,extraRequire,missingReturn,uselessCode} checked by tsc
2479
2513
  */
2480
2514
 
2481
2515
  /**