@angular/core 14.1.1 → 14.2.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.1.1
2
+ * @license Angular v14.2.0-next.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -10317,7 +10317,8 @@ export declare function ɵinjectChangeDetectorRef(flags: InjectFlags): ChangeDet
10317
10317
  export declare const ɵINJECTOR_SCOPE: InjectionToken<InjectorScope | null>;
10318
10318
 
10319
10319
  /**
10320
- * Internal bootstrap application API that implements the core bootstrap logic.
10320
+ * Internal create application API that implements the core application creation logic and optional
10321
+ * bootstrap logic.
10321
10322
  *
10322
10323
  * Platforms (such as `platform-browser`) may require different set of application and platform
10323
10324
  * providers for an application to function correctly. As a result, platforms may use this function
@@ -10326,8 +10327,8 @@ export declare const ɵINJECTOR_SCOPE: InjectionToken<InjectorScope | null>;
10326
10327
  *
10327
10328
  * @returns A promise that returns an `ApplicationRef` instance once resolved.
10328
10329
  */
10329
- export declare function ɵinternalBootstrapApplication(config: {
10330
- rootComponent: Type<unknown>;
10330
+ export declare function ɵinternalCreateApplication(config: {
10331
+ rootComponent?: Type<unknown>;
10331
10332
  appProviders?: Array<Provider | ImportedNgModuleProviders>;
10332
10333
  platformProviders?: Provider[];
10333
10334
  }): Promise<ApplicationRef>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@angular/core",
3
- "version": "14.1.1",
3
+ "version": "14.2.0-next.0",
4
4
  "description": "Angular - the core framework",
5
5
  "author": "angular",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @license Angular v14.1.1
2
+ * @license Angular v14.2.0-next.0
3
3
  * (c) 2010-2022 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
@@ -178,13 +178,11 @@ export declare function flush(maxTurns?: number): number;
178
178
  export declare function flushMicrotasks(): void;
179
179
 
180
180
  /**
181
- * Returns a singleton of the applicable `TestBed`.
182
- *
183
- * It will be either an instance of `TestBedViewEngine` or `TestBedRender3`.
181
+ * Returns a singleton of the `TestBed` class.
184
182
  *
185
183
  * @publicApi
186
184
  */
187
- export declare const getTestBed: () => TestBed;
185
+ export declare function getTestBed(): TestBed;
188
186
 
189
187
  /**
190
188
  * Allows injecting dependencies in `beforeEach()` and `it()`. Note: this function
@@ -255,8 +253,8 @@ export declare function resetFakeAsyncZone(): void;
255
253
  * @publicApi
256
254
  */
257
255
  export declare interface TestBed {
258
- platform: PlatformRef;
259
- ngModule: Type<any> | Type<any>[];
256
+ get platform(): PlatformRef;
257
+ get ngModule(): Type<any> | Type<any>[];
260
258
  /**
261
259
  * Initialize the environment for testing with a compiler factory, a PlatformRef, and an
262
260
  * angular module. These are common to every test in the suite.
@@ -273,12 +271,12 @@ export declare interface TestBed {
273
271
  * Reset the providers for the test injector.
274
272
  */
275
273
  resetTestEnvironment(): void;
276
- resetTestingModule(): void;
274
+ resetTestingModule(): TestBed;
277
275
  configureCompiler(config: {
278
276
  providers?: any[];
279
277
  useJit?: boolean;
280
278
  }): void;
281
- configureTestingModule(moduleDef: TestModuleMetadata): void;
279
+ configureTestingModule(moduleDef: TestModuleMetadata): TestBed;
282
280
  compileComponents(): Promise<any>;
283
281
  inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
284
282
  inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T | null;
@@ -287,26 +285,27 @@ export declare interface TestBed {
287
285
  /** @deprecated from v9.0.0 use TestBed.inject */
288
286
  get(token: any, notFoundValue?: any): any;
289
287
  execute(tokens: any[], fn: Function, context?: any): any;
290
- overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): void;
291
- overrideComponent(component: Type<any>, override: MetadataOverride<Component>): void;
292
- overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): void;
293
- overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): void;
288
+ overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBed;
289
+ overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBed;
290
+ overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBed;
291
+ overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBed;
292
+ overrideTemplate(component: Type<any>, template: string): TestBed;
294
293
  /**
295
294
  * Overwrites all providers for the given token with the given provider definition.
296
295
  */
297
296
  overrideProvider(token: any, provider: {
298
297
  useFactory: Function;
299
298
  deps: any[];
300
- }): void;
299
+ }): TestBed;
301
300
  overrideProvider(token: any, provider: {
302
301
  useValue: any;
303
- }): void;
302
+ }): TestBed;
304
303
  overrideProvider(token: any, provider: {
305
304
  useFactory?: Function;
306
305
  useValue?: any;
307
306
  deps?: any[];
308
- }): void;
309
- overrideTemplateUsingTestingModule(component: Type<any>, template: string): void;
307
+ }): TestBed;
308
+ overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBed;
310
309
  createComponent<T>(component: Type<T>): ComponentFixture<T>;
311
310
  }
312
311
 
@@ -317,92 +316,17 @@ export declare interface TestBed {
317
316
  *
318
317
  * `TestBed` is the primary api for writing unit tests for Angular applications and libraries.
319
318
  *
320
- * Note: Use `TestBed` in tests. It will be set to either `TestBedViewEngine` or `TestBedRender3`
321
- * according to the compiler used.
322
- *
323
319
  * @publicApi
324
320
  */
325
321
  export declare const TestBed: TestBedStatic;
326
322
 
327
323
  /**
328
- * Static methods implemented by the `TestBedViewEngine` and `TestBedRender3`
324
+ * Static methods implemented by the `TestBed`.
329
325
  *
330
326
  * @publicApi
331
327
  */
332
- export declare interface TestBedStatic {
328
+ export declare interface TestBedStatic extends TestBed {
333
329
  new (...args: any[]): TestBed;
334
- /**
335
- * Initialize the environment for testing with a compiler factory, a PlatformRef, and an
336
- * angular module. These are common to every test in the suite.
337
- *
338
- * This may only be called once, to set up the common providers for the current test
339
- * suite on the current platform. If you absolutely need to change the providers,
340
- * first use `resetTestEnvironment`.
341
- *
342
- * Test modules and platforms for individual platforms are available from
343
- * '@angular/<platform_name>/testing'.
344
- */
345
- initTestEnvironment(ngModule: Type<any> | Type<any>[], platform: PlatformRef, options?: TestEnvironmentOptions): TestBed;
346
- /**
347
- * Reset the providers for the test injector.
348
- */
349
- resetTestEnvironment(): void;
350
- resetTestingModule(): TestBedStatic;
351
- /**
352
- * Allows overriding default compiler providers and settings
353
- * which are defined in test_injector.js
354
- */
355
- configureCompiler(config: {
356
- providers?: any[];
357
- useJit?: boolean;
358
- }): TestBedStatic;
359
- /**
360
- * Allows overriding default providers, directives, pipes, modules of the test injector,
361
- * which are defined in test_injector.js
362
- */
363
- configureTestingModule(moduleDef: TestModuleMetadata): TestBedStatic;
364
- /**
365
- * Compile components with a `templateUrl` for the test's NgModule.
366
- * It is necessary to call this function
367
- * as fetching urls is asynchronous.
368
- */
369
- compileComponents(): Promise<any>;
370
- overrideModule(ngModule: Type<any>, override: MetadataOverride<NgModule>): TestBedStatic;
371
- overrideComponent(component: Type<any>, override: MetadataOverride<Component>): TestBedStatic;
372
- overrideDirective(directive: Type<any>, override: MetadataOverride<Directive>): TestBedStatic;
373
- overridePipe(pipe: Type<any>, override: MetadataOverride<Pipe>): TestBedStatic;
374
- overrideTemplate(component: Type<any>, template: string): TestBedStatic;
375
- /**
376
- * Overrides the template of the given component, compiling the template
377
- * in the context of the TestingModule.
378
- *
379
- * Note: This works for JIT and AOTed components as well.
380
- */
381
- overrideTemplateUsingTestingModule(component: Type<any>, template: string): TestBedStatic;
382
- /**
383
- * Overwrites all providers for the given token with the given provider definition.
384
- *
385
- * Note: This works for JIT and AOTed components as well.
386
- */
387
- overrideProvider(token: any, provider: {
388
- useFactory: Function;
389
- deps: any[];
390
- }): TestBedStatic;
391
- overrideProvider(token: any, provider: {
392
- useValue: any;
393
- }): TestBedStatic;
394
- overrideProvider(token: any, provider: {
395
- useFactory?: Function;
396
- useValue?: any;
397
- deps?: any[];
398
- }): TestBedStatic;
399
- inject<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;
400
- inject<T>(token: ProviderToken<T>, notFoundValue: null, flags?: InjectFlags): T | null;
401
- /** @deprecated from v9.0.0 use TestBed.inject */
402
- get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): any;
403
- /** @deprecated from v9.0.0 use TestBed.inject */
404
- get(token: any, notFoundValue?: any): any;
405
- createComponent<T>(component: Type<T>): ComponentFixture<T>;
406
330
  }
407
331
 
408
332
  /**