@angular/core 14.0.0-next.8 → 14.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/esm2020/src/application_ref.mjs +232 -66
  2. package/esm2020/src/application_tokens.mjs +5 -2
  3. package/esm2020/src/change_detection/change_detection.mjs +2 -2
  4. package/esm2020/src/change_detection/change_detector_ref.mjs +3 -3
  5. package/esm2020/src/change_detection/differs/default_iterable_differ.mjs +3 -3
  6. package/esm2020/src/change_detection/differs/default_keyvalue_differ.mjs +3 -3
  7. package/esm2020/src/change_detection/differs/iterable_differs.mjs +2 -2
  8. package/esm2020/src/change_detection/differs/keyvalue_differs.mjs +2 -2
  9. package/esm2020/src/compiler/compiler_facade.mjs +2 -2
  10. package/esm2020/src/compiler/compiler_facade_interface.mjs +7 -1
  11. package/esm2020/src/console.mjs +4 -3
  12. package/esm2020/src/core.mjs +2 -2
  13. package/esm2020/src/core_private_export.mjs +5 -3
  14. package/esm2020/src/core_render3_private_export.mjs +4 -3
  15. package/esm2020/src/debug/debug_node.mjs +5 -5
  16. package/esm2020/src/di/create_injector.mjs +35 -0
  17. package/esm2020/src/di/index.mjs +4 -1
  18. package/esm2020/src/di/initializer_token.mjs +16 -0
  19. package/esm2020/src/di/injection_token.mjs +7 -1
  20. package/esm2020/src/di/injector.mjs +3 -3
  21. package/esm2020/src/di/injector_compatibility.mjs +4 -6
  22. package/esm2020/src/di/injector_token.mjs +2 -2
  23. package/esm2020/src/di/interface/defs.mjs +1 -1
  24. package/esm2020/src/di/interface/provider.mjs +1 -1
  25. package/esm2020/src/di/internal_tokens.mjs +10 -0
  26. package/esm2020/src/di/jit/injectable.mjs +3 -3
  27. package/esm2020/src/di/metadata.mjs +6 -6
  28. package/esm2020/src/di/provider_collection.mjs +224 -0
  29. package/esm2020/src/di/r3_injector.mjs +87 -157
  30. package/esm2020/src/di/scope.mjs +1 -1
  31. package/esm2020/src/errors.mjs +1 -1
  32. package/esm2020/src/linker/component_factory.mjs +1 -1
  33. package/esm2020/src/linker/ng_module_factory.mjs +1 -1
  34. package/esm2020/src/linker/template_ref.mjs +3 -3
  35. package/esm2020/src/linker/view_container_ref.mjs +15 -12
  36. package/esm2020/src/metadata/directives.mjs +1 -1
  37. package/esm2020/src/metadata/ng_module.mjs +1 -1
  38. package/esm2020/src/metadata.mjs +1 -1
  39. package/esm2020/src/platform_core_providers.mjs +3 -14
  40. package/esm2020/src/render3/assert.mjs +3 -3
  41. package/esm2020/src/render3/bindings.mjs +2 -2
  42. package/esm2020/src/render3/collect_native_nodes.mjs +5 -5
  43. package/esm2020/src/render3/component.mjs +8 -8
  44. package/esm2020/src/render3/component_ref.mjs +15 -7
  45. package/esm2020/src/render3/context_discovery.mjs +4 -4
  46. package/esm2020/src/render3/definition.mjs +19 -20
  47. package/esm2020/src/render3/di.mjs +21 -21
  48. package/esm2020/src/render3/di_setup.mjs +7 -6
  49. package/esm2020/src/render3/errors.mjs +22 -4
  50. package/esm2020/src/render3/errors_di.mjs +10 -7
  51. package/esm2020/src/render3/features/inherit_definition_feature.mjs +4 -3
  52. package/esm2020/src/render3/features/standalone_feature.mjs +70 -0
  53. package/esm2020/src/render3/hooks.mjs +19 -19
  54. package/esm2020/src/render3/i18n/i18n_apply.mjs +16 -16
  55. package/esm2020/src/render3/i18n/i18n_debug.mjs +9 -9
  56. package/esm2020/src/render3/i18n/i18n_insert_before_index.mjs +2 -2
  57. package/esm2020/src/render3/i18n/i18n_parse.mjs +14 -14
  58. package/esm2020/src/render3/i18n/i18n_util.mjs +7 -7
  59. package/esm2020/src/render3/index.mjs +5 -4
  60. package/esm2020/src/render3/instructions/advance.mjs +4 -4
  61. package/esm2020/src/render3/instructions/all.mjs +2 -1
  62. package/esm2020/src/render3/instructions/change_detection.mjs +2 -2
  63. package/esm2020/src/render3/instructions/element.mjs +47 -12
  64. package/esm2020/src/render3/instructions/element_container.mjs +3 -3
  65. package/esm2020/src/render3/instructions/i18n.mjs +2 -2
  66. package/esm2020/src/render3/instructions/listener.mjs +8 -11
  67. package/esm2020/src/render3/instructions/lview_debug.mjs +26 -26
  68. package/esm2020/src/render3/instructions/projection.mjs +3 -3
  69. package/esm2020/src/render3/instructions/shared.mjs +138 -88
  70. package/esm2020/src/render3/instructions/styling.mjs +5 -5
  71. package/esm2020/src/render3/instructions/template.mjs +3 -3
  72. package/esm2020/src/render3/instructions/text.mjs +2 -2
  73. package/esm2020/src/render3/interfaces/definition.mjs +1 -1
  74. package/esm2020/src/render3/interfaces/node.mjs +10 -10
  75. package/esm2020/src/render3/interfaces/public_definitions.mjs +1 -1
  76. package/esm2020/src/render3/interfaces/styling.mjs +18 -18
  77. package/esm2020/src/render3/interfaces/type_checks.mjs +5 -5
  78. package/esm2020/src/render3/interfaces/view.mjs +1 -1
  79. package/esm2020/src/render3/jit/directive.mjs +135 -13
  80. package/esm2020/src/render3/jit/environment.mjs +2 -1
  81. package/esm2020/src/render3/jit/module.mjs +84 -27
  82. package/esm2020/src/render3/jit/partial.mjs +8 -8
  83. package/esm2020/src/render3/jit/pipe.mjs +4 -6
  84. package/esm2020/src/render3/jit/util.mjs +15 -0
  85. package/esm2020/src/render3/ng_module_ref.mjs +34 -4
  86. package/esm2020/src/render3/node_assert.mjs +8 -8
  87. package/esm2020/src/render3/node_manipulation.mjs +40 -40
  88. package/esm2020/src/render3/node_manipulation_i18n.mjs +3 -3
  89. package/esm2020/src/render3/node_selector_matcher.mjs +28 -28
  90. package/esm2020/src/render3/pipe.mjs +2 -2
  91. package/esm2020/src/render3/query.mjs +12 -12
  92. package/esm2020/src/render3/state.mjs +21 -10
  93. package/esm2020/src/render3/styling/class_differ.mjs +3 -3
  94. package/esm2020/src/render3/styling/static_styling.mjs +3 -3
  95. package/esm2020/src/render3/styling/styling_parser.mjs +17 -17
  96. package/esm2020/src/render3/util/attrs_utils.mjs +10 -10
  97. package/esm2020/src/render3/util/discovery_utils.mjs +4 -4
  98. package/esm2020/src/render3/util/injector_utils.mjs +4 -4
  99. package/esm2020/src/render3/util/view_traversal_utils.mjs +2 -2
  100. package/esm2020/src/render3/util/view_utils.mjs +3 -3
  101. package/esm2020/src/render3/view_ref.mjs +12 -8
  102. package/esm2020/src/sanitization/bypass.mjs +7 -7
  103. package/esm2020/src/sanitization/sanitization.mjs +10 -10
  104. package/esm2020/src/testability/testability.mjs +69 -19
  105. package/esm2020/src/util/global.mjs +8 -8
  106. package/esm2020/src/util/raf.mjs +1 -1
  107. package/esm2020/src/version.mjs +1 -1
  108. package/esm2020/testing/src/logger.mjs +3 -3
  109. package/esm2020/testing/src/ng_zone_mock.mjs +3 -3
  110. package/esm2020/testing/src/r3_test_bed.mjs +38 -13
  111. package/esm2020/testing/src/r3_test_bed_compiler.mjs +45 -4
  112. package/esm2020/testing/src/resolvers.mjs +1 -1
  113. package/esm2020/testing/src/test_bed.mjs +1 -1
  114. package/esm2020/testing/src/test_bed_common.mjs +5 -1
  115. package/fesm2015/core.mjs +6637 -5790
  116. package/fesm2015/core.mjs.map +1 -1
  117. package/fesm2015/testing.mjs +88 -15
  118. package/fesm2015/testing.mjs.map +1 -1
  119. package/fesm2020/core.mjs +6590 -5749
  120. package/fesm2020/core.mjs.map +1 -1
  121. package/fesm2020/testing.mjs +85 -15
  122. package/fesm2020/testing.mjs.map +1 -1
  123. package/{core.d.ts → index.d.ts} +14774 -14596
  124. package/package.json +4 -4
  125. package/schematics/migrations/path-match-type/index.d.ts +11 -0
  126. package/schematics/migrations/path-match-type/index.js +95 -0
  127. package/schematics/migrations/path-match-type/transform.d.ts +19 -0
  128. package/schematics/migrations/path-match-type/transform.js +48 -0
  129. package/schematics/migrations/path-match-type/update_recorder.d.ts +18 -0
  130. package/schematics/migrations/path-match-type/update_recorder.js +20 -0
  131. package/schematics/migrations/path-match-type/util.d.ts +11 -0
  132. package/schematics/migrations/path-match-type/util.js +106 -0
  133. package/schematics/migrations.json +8 -3
  134. package/testing/{testing.d.ts → index.d.ts} +565 -577
  135. package/esm2020/src/change_detection/change_detection_util.mjs +0 -64
  136. package/testing/package.json +0 -9
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @license Angular v14.0.0-next.8
2
+ * @license Angular v14.0.0-rc.1
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
7
- import { getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ModuleWithComponentFactories, InjectionToken, Injector, InjectFlags, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
7
+ import { getDebugNode, RendererFactory2, ɵstringify, ɵReflectionCapabilities, Directive, Component, Pipe, NgModule, ɵgetInjectableDef, resolveForwardRef, ɵNG_COMP_DEF, ɵRender3NgModuleRef, ApplicationInitStatus, LOCALE_ID, ɵDEFAULT_LOCALE_ID, ɵsetLocaleId, ɵRender3ComponentFactory, ɵcompileComponent, ɵNG_DIR_DEF, ɵcompileDirective, ɵNG_PIPE_DEF, ɵcompilePipe, ɵNG_MOD_DEF, ɵtransitiveScopesFor, ɵpatchComponentDefWithScope, ɵNG_INJ_DEF, ɵcompileNgModuleDefs, NgZone, Compiler, COMPILER_OPTIONS, ɵNgModuleFactory, ModuleWithComponentFactories, InjectionToken, Injector, InjectFlags, ɵsetAllowDuplicateNgModuleIdsForTest, ɵresetCompiledComponents, ɵsetUnknownElementStrictMode, ɵsetUnknownPropertyStrictMode, ɵgetUnknownElementStrictMode, ɵgetUnknownPropertyStrictMode, ɵflushModuleScopingQueueAsMuchAsPossible } from '@angular/core';
8
8
  import { __awaiter } from 'tslib';
9
9
  import { ResourceLoader } from '@angular/compiler';
10
10
 
@@ -831,17 +831,28 @@ class R3TestBedCompiler {
831
831
  this.queueTypesFromModulesArray([ngModule]);
832
832
  }
833
833
  overrideComponent(component, override) {
834
+ this.verifyNoStandaloneFlagOverrides(component, override);
834
835
  this.resolvers.component.addOverride(component, override);
835
836
  this.pendingComponents.add(component);
836
837
  }
837
838
  overrideDirective(directive, override) {
839
+ this.verifyNoStandaloneFlagOverrides(directive, override);
838
840
  this.resolvers.directive.addOverride(directive, override);
839
841
  this.pendingDirectives.add(directive);
840
842
  }
841
843
  overridePipe(pipe, override) {
844
+ this.verifyNoStandaloneFlagOverrides(pipe, override);
842
845
  this.resolvers.pipe.addOverride(pipe, override);
843
846
  this.pendingPipes.add(pipe);
844
847
  }
848
+ verifyNoStandaloneFlagOverrides(type, override) {
849
+ var _a, _b, _c;
850
+ if (((_a = override.add) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('standalone')) || ((_b = override.set) === null || _b === void 0 ? void 0 : _b.hasOwnProperty('standalone')) ||
851
+ ((_c = override.remove) === null || _c === void 0 ? void 0 : _c.hasOwnProperty('standalone'))) {
852
+ throw new Error(`An override for the ${type.name} class has the \`standalone\` flag. ` +
853
+ `Changing the \`standalone\` flag via TestBed overrides is not supported.`);
854
+ }
855
+ }
845
856
  overrideProvider(token, provider) {
846
857
  let providerDef;
847
858
  if (provider.useFactory !== undefined) {
@@ -1060,12 +1071,29 @@ class R3TestBedCompiler {
1060
1071
  this.seenDirectives.clear();
1061
1072
  }
1062
1073
  applyProviderOverridesToModule(moduleType) {
1074
+ var _a;
1063
1075
  if (this.moduleProvidersOverridden.has(moduleType)) {
1064
1076
  return;
1065
1077
  }
1066
1078
  this.moduleProvidersOverridden.add(moduleType);
1079
+ // NOTE: the line below triggers JIT compilation of the module injector,
1080
+ // which also invokes verification of the NgModule semantics, which produces
1081
+ // detailed error messages. The fact that the code relies on this line being
1082
+ // present here is suspicious and should be refactored in a way that the line
1083
+ // below can be moved (for ex. after an early exit check below).
1067
1084
  const injectorDef = moduleType[ɵNG_INJ_DEF];
1068
- if (this.providerOverridesByToken.size > 0) {
1085
+ // No provider overrides, exit early.
1086
+ if (this.providerOverridesByToken.size === 0)
1087
+ return;
1088
+ if (isStandaloneComponent(moduleType)) {
1089
+ // Visit all component dependencies and override providers there.
1090
+ const def = getComponentDef(moduleType);
1091
+ const dependencies = maybeUnwrapFn((_a = def.dependencies) !== null && _a !== void 0 ? _a : []);
1092
+ for (const dependency of dependencies) {
1093
+ this.applyProviderOverridesToModule(dependency);
1094
+ }
1095
+ }
1096
+ else {
1069
1097
  const providers = [
1070
1098
  ...injectorDef.providers,
1071
1099
  ...(this.providerOverridesByModule.get(moduleType) || [])
@@ -1140,8 +1168,11 @@ class R3TestBedCompiler {
1140
1168
  // real module, which was imported. This pattern is understood to mean that the component
1141
1169
  // should use its original scope, but that the testing module should also contain the
1142
1170
  // component in its scope.
1143
- if (!this.componentToModuleScope.has(type) ||
1144
- this.componentToModuleScope.get(type) === TestingModuleOverride.DECLARATION) {
1171
+ //
1172
+ // Note: standalone components have no associated NgModule, so the `moduleType` can be `null`.
1173
+ if (moduleType !== null &&
1174
+ (!this.componentToModuleScope.has(type) ||
1175
+ this.componentToModuleScope.get(type) === TestingModuleOverride.DECLARATION)) {
1145
1176
  this.componentToModuleScope.set(type, moduleType);
1146
1177
  }
1147
1178
  return;
@@ -1166,6 +1197,7 @@ class R3TestBedCompiler {
1166
1197
  // encountered. In some test setups, this caching resulted in 10X runtime improvement.
1167
1198
  const processedNgModuleDefs = new Set();
1168
1199
  const queueTypesFromModulesArrayRecur = (arr) => {
1200
+ var _a;
1169
1201
  for (const value of arr) {
1170
1202
  if (Array.isArray(value)) {
1171
1203
  queueTypesFromModulesArrayRecur(value);
@@ -1185,6 +1217,11 @@ class R3TestBedCompiler {
1185
1217
  else if (isModuleWithProviders(value)) {
1186
1218
  queueTypesFromModulesArrayRecur([value.ngModule]);
1187
1219
  }
1220
+ else if (isStandaloneComponent(value)) {
1221
+ this.queueType(value, null);
1222
+ const def = getComponentDef(value);
1223
+ queueTypesFromModulesArrayRecur(maybeUnwrapFn((_a = def.dependencies) !== null && _a !== void 0 ? _a : []));
1224
+ }
1188
1225
  }
1189
1226
  };
1190
1227
  queueTypesFromModulesArrayRecur(arr);
@@ -1402,6 +1439,14 @@ function initResolvers() {
1402
1439
  pipe: new PipeResolver()
1403
1440
  };
1404
1441
  }
1442
+ function isStandaloneComponent(value) {
1443
+ const def = getComponentDef(value);
1444
+ return !!(def === null || def === void 0 ? void 0 : def.standalone);
1445
+ }
1446
+ function getComponentDef(value) {
1447
+ var _a;
1448
+ return (_a = value.ɵcmp) !== null && _a !== void 0 ? _a : null;
1449
+ }
1405
1450
  function hasNgModuleDef(value) {
1406
1451
  return value.hasOwnProperty('ɵmod');
1407
1452
  }
@@ -1480,6 +1525,10 @@ class R3TestCompiler {
1480
1525
  */
1481
1526
  /** Whether test modules should be torn down by default. */
1482
1527
  const TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT = true;
1528
+ /** Whether unknown elements in templates should throw by default. */
1529
+ const THROW_ON_UNKNOWN_ELEMENTS_DEFAULT = false;
1530
+ /** Whether unknown properties in templates should throw by default. */
1531
+ const THROW_ON_UNKNOWN_PROPERTIES_DEFAULT = false;
1483
1532
  /**
1484
1533
  * An abstract class for inserting the root test component element in a platform independent way.
1485
1534
  *
@@ -1539,9 +1588,9 @@ class TestBedRender3 {
1539
1588
  *
1540
1589
  * @publicApi
1541
1590
  */
1542
- static initTestEnvironment(ngModule, platform, summariesOrOptions) {
1591
+ static initTestEnvironment(ngModule, platform, options) {
1543
1592
  const testBed = _getTestBedRender3();
1544
- testBed.initTestEnvironment(ngModule, platform, summariesOrOptions);
1593
+ testBed.initTestEnvironment(ngModule, platform, options);
1545
1594
  return testBed;
1546
1595
  }
1547
1596
  /**
@@ -1639,14 +1688,13 @@ class TestBedRender3 {
1639
1688
  *
1640
1689
  * @publicApi
1641
1690
  */
1642
- initTestEnvironment(ngModule, platform, summariesOrOptions) {
1691
+ initTestEnvironment(ngModule, platform, options) {
1643
1692
  if (this.platform || this.ngModule) {
1644
1693
  throw new Error('Cannot set base providers because it has already been called');
1645
1694
  }
1646
- // If `summariesOrOptions` is a function, it means that it's
1647
- // an AOT summaries factory which Ivy doesn't support.
1648
- TestBedRender3._environmentTeardownOptions =
1649
- typeof summariesOrOptions === 'function' ? undefined : summariesOrOptions === null || summariesOrOptions === void 0 ? void 0 : summariesOrOptions.teardown;
1695
+ TestBedRender3._environmentTeardownOptions = options === null || options === void 0 ? void 0 : options.teardown;
1696
+ TestBedRender3._environmentErrorOnUnknownElementsOption = options === null || options === void 0 ? void 0 : options.errorOnUnknownElements;
1697
+ TestBedRender3._environmentErrorOnUnknownPropertiesOption = options === null || options === void 0 ? void 0 : options.errorOnUnknownProperties;
1650
1698
  this.platform = platform;
1651
1699
  this.ngModule = ngModule;
1652
1700
  this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);
@@ -1670,12 +1718,17 @@ class TestBedRender3 {
1670
1718
  ɵsetAllowDuplicateNgModuleIdsForTest(false);
1671
1719
  }
1672
1720
  resetTestingModule() {
1721
+ var _a, _b;
1673
1722
  this.checkGlobalCompilationFinished();
1674
1723
  ɵresetCompiledComponents();
1675
1724
  if (this._compiler !== null) {
1676
1725
  this.compiler.restoreOriginalState();
1677
1726
  }
1678
1727
  this._compiler = new R3TestBedCompiler(this.platform, this.ngModule);
1728
+ // Restore the previous value of the "error on unknown elements" option
1729
+ ɵsetUnknownElementStrictMode((_a = this._previousErrorOnUnknownElementsOption) !== null && _a !== void 0 ? _a : THROW_ON_UNKNOWN_ELEMENTS_DEFAULT);
1730
+ // Restore the previous value of the "error on unknown properties" option
1731
+ ɵsetUnknownPropertyStrictMode((_b = this._previousErrorOnUnknownPropertiesOption) !== null && _b !== void 0 ? _b : THROW_ON_UNKNOWN_PROPERTIES_DEFAULT);
1679
1732
  // We have to chain a couple of try/finally blocks, because each step can
1680
1733
  // throw errors and we don't want it to interrupt the next step and we also
1681
1734
  // want an error to be thrown at the end.
@@ -1691,6 +1744,8 @@ class TestBedRender3 {
1691
1744
  finally {
1692
1745
  this._testModuleRef = null;
1693
1746
  this._instanceTeardownOptions = undefined;
1747
+ this._instanceErrorOnUnknownElementsOption = undefined;
1748
+ this._instanceErrorOnUnknownPropertiesOption = undefined;
1694
1749
  }
1695
1750
  }
1696
1751
  }
@@ -1709,9 +1764,17 @@ class TestBedRender3 {
1709
1764
  // their components scoped properly. See the `checkGlobalCompilationFinished` function
1710
1765
  // description for additional info.
1711
1766
  this.checkGlobalCompilationFinished();
1712
- // Always re-assign the teardown options, even if they're undefined.
1713
- // This ensures that we don't carry the options between tests.
1767
+ // Always re-assign the options, even if they're undefined.
1768
+ // This ensures that we don't carry them between tests.
1714
1769
  this._instanceTeardownOptions = moduleDef.teardown;
1770
+ this._instanceErrorOnUnknownElementsOption = moduleDef.errorOnUnknownElements;
1771
+ this._instanceErrorOnUnknownPropertiesOption = moduleDef.errorOnUnknownProperties;
1772
+ // Store the current value of the strict mode option,
1773
+ // so we can restore it later
1774
+ this._previousErrorOnUnknownElementsOption = ɵgetUnknownElementStrictMode();
1775
+ ɵsetUnknownElementStrictMode(this.shouldThrowErrorOnUnknownElements());
1776
+ this._previousErrorOnUnknownPropertiesOption = ɵgetUnknownPropertyStrictMode();
1777
+ ɵsetUnknownPropertyStrictMode(this.shouldThrowErrorOnUnknownProperties());
1715
1778
  this.compiler.configureTestingModule(moduleDef);
1716
1779
  }
1717
1780
  compileComponents() {
@@ -1767,7 +1830,7 @@ class TestBedRender3 {
1767
1830
  testComponentRenderer.insertRootElement(rootElId);
1768
1831
  const componentDef = type.ɵcmp;
1769
1832
  if (!componentDef) {
1770
- throw new Error(`It looks like '${ɵstringify(type)}' has not been IVY compiled - it has no 'ɵcmp' field`);
1833
+ throw new Error(`It looks like '${ɵstringify(type)}' has not been compiled.`);
1771
1834
  }
1772
1835
  // TODO: Don't cast as `InjectionToken<boolean>`, proper type is boolean[]
1773
1836
  const noNgZone = this.inject(ComponentFixtureNoNgZone, false);
@@ -1860,6 +1923,16 @@ class TestBedRender3 {
1860
1923
  // Otherwise use the configured behavior or default to rethrowing.
1861
1924
  return (_b = (_a = instanceOptions === null || instanceOptions === void 0 ? void 0 : instanceOptions.rethrowErrors) !== null && _a !== void 0 ? _a : environmentOptions === null || environmentOptions === void 0 ? void 0 : environmentOptions.rethrowErrors) !== null && _b !== void 0 ? _b : this.shouldTearDownTestingModule();
1862
1925
  }
1926
+ shouldThrowErrorOnUnknownElements() {
1927
+ var _a, _b;
1928
+ // Check if a configuration has been provided to throw when an unknown element is found
1929
+ return (_b = (_a = this._instanceErrorOnUnknownElementsOption) !== null && _a !== void 0 ? _a : TestBedRender3._environmentErrorOnUnknownElementsOption) !== null && _b !== void 0 ? _b : THROW_ON_UNKNOWN_ELEMENTS_DEFAULT;
1930
+ }
1931
+ shouldThrowErrorOnUnknownProperties() {
1932
+ var _a, _b;
1933
+ // Check if a configuration has been provided to throw when an unknown property is found
1934
+ return (_b = (_a = this._instanceErrorOnUnknownPropertiesOption) !== null && _a !== void 0 ? _a : TestBedRender3._environmentErrorOnUnknownPropertiesOption) !== null && _b !== void 0 ? _b : THROW_ON_UNKNOWN_PROPERTIES_DEFAULT;
1935
+ }
1863
1936
  shouldTearDownTestingModule() {
1864
1937
  var _a, _b, _c, _d;
1865
1938
  return (_d = (_b = (_a = this._instanceTeardownOptions) === null || _a === void 0 ? void 0 : _a.destroyAfterEach) !== null && _b !== void 0 ? _b : (_c = TestBedRender3._environmentTeardownOptions) === null || _c === void 0 ? void 0 : _c.destroyAfterEach) !== null && _d !== void 0 ? _d : TEARDOWN_TESTING_MODULE_ON_DESTROY_DEFAULT;