@angular/core 11.2.1 → 11.2.5

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 (39) hide show
  1. package/bundles/core-testing.umd.js +2 -2
  2. package/bundles/core-testing.umd.min.js +2 -2
  3. package/bundles/core-testing.umd.min.js.map +1 -1
  4. package/bundles/core.umd.js +457 -479
  5. package/bundles/core.umd.js.map +1 -1
  6. package/bundles/core.umd.min.js +118 -118
  7. package/bundles/core.umd.min.js.map +1 -1
  8. package/core.d.ts +36 -47
  9. package/core.metadata.json +1 -1
  10. package/esm2015/src/application_module.js +2 -3
  11. package/esm2015/src/application_ref.js +7 -6
  12. package/esm2015/src/change_detection/pipe_transform.js +1 -1
  13. package/esm2015/src/compiler/compiler_facade_interface.js +1 -1
  14. package/esm2015/src/core_render3_private_export.js +2 -2
  15. package/esm2015/src/di/inject_switch.js +3 -2
  16. package/esm2015/src/di/injection_token.js +1 -1
  17. package/esm2015/src/di/interface/defs.js +2 -9
  18. package/esm2015/src/di/jit/environment.js +2 -18
  19. package/esm2015/src/di/r3_injector.js +3 -8
  20. package/esm2015/src/metadata/ng_module.js +5 -6
  21. package/esm2015/src/render3/definition.js +1 -2
  22. package/esm2015/src/render3/definition_factory.js +1 -1
  23. package/esm2015/src/render3/di.js +12 -22
  24. package/esm2015/src/render3/errors.js +1 -1
  25. package/esm2015/src/render3/index.js +2 -2
  26. package/esm2015/src/render3/instructions/lview_debug.js +1 -2
  27. package/esm2015/src/render3/interfaces/definition.js +1 -1
  28. package/esm2015/src/render3/jit/environment.js +1 -2
  29. package/esm2015/src/render3/jit/module.js +22 -4
  30. package/esm2015/src/render3/util/discovery_utils.js +1 -1
  31. package/esm2015/src/version.js +1 -1
  32. package/fesm2015/core.js +154 -175
  33. package/fesm2015/core.js.map +1 -1
  34. package/fesm2015/testing.js +2 -2
  35. package/package.json +1 -1
  36. package/schematics/migrations/renderer-to-renderer2/helpers.js +1 -2
  37. package/src/r3_symbols.d.ts +12 -16
  38. package/testing/testing.d.ts +2 -2
  39. package/testing.d.ts +2 -2
package/core.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @license Angular v11.2.1
3
- * (c) 2010-2020 Google LLC. https://angular.io/
2
+ * @license Angular v11.2.5
3
+ * (c) 2010-2021 Google LLC. https://angular.io/
4
4
  * License: MIT
5
5
  */
6
6
 
@@ -334,7 +334,6 @@ export declare class ApplicationModule {
334
334
  */
335
335
  export declare class ApplicationRef {
336
336
  private _zone;
337
- private _console;
338
337
  private _injector;
339
338
  private _exceptionHandler;
340
339
  private _componentFactoryResolver;
@@ -2493,7 +2492,7 @@ declare type FactoryFn<T> = {
2493
2492
  * Subclasses without an explicit constructor call through to the factory of their base
2494
2493
  * definition, providing it with their own constructor to instantiate.
2495
2494
  */
2496
- <U extends T>(t: Type<U>): U;
2495
+ <U extends T>(t?: Type<U>): U;
2497
2496
  /**
2498
2497
  * If no constructor to instantiate is provided, an instance of type T itself is created.
2499
2498
  */
@@ -3277,7 +3276,7 @@ export declare interface InjectableType<T> extends Type<T> {
3277
3276
  /**
3278
3277
  * Opaque type whose structure is highly version dependent. Do not rely on any properties.
3279
3278
  */
3280
- ɵprov: never;
3279
+ ɵprov: unknown;
3281
3280
  }
3282
3281
 
3283
3282
 
@@ -3371,7 +3370,7 @@ export declare enum InjectFlags {
3371
3370
  */
3372
3371
  export declare class InjectionToken<T> {
3373
3372
  protected _desc: string;
3374
- readonly ɵprov: never | undefined;
3373
+ readonly ɵprov: unknown;
3375
3374
  constructor(_desc: string, options?: {
3376
3375
  providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
3377
3376
  factory: () => T;
@@ -3449,7 +3448,7 @@ export declare abstract class Injector {
3449
3448
  name?: string;
3450
3449
  }): Injector;
3451
3450
  /** @nocollapse */
3452
- static ɵprov: never;
3451
+ static ɵprov: unknown;
3453
3452
  }
3454
3453
 
3455
3454
  declare const INJECTOR_2 = 9;
@@ -3459,13 +3458,14 @@ declare const INJECTOR_2 = 9;
3459
3458
  *
3460
3459
  * `InjectorDefTypes` can be used to configure a `StaticInjector`.
3461
3460
  *
3461
+ * This is an opaque type whose structure is highly version dependent. Do not rely on any
3462
+ * properties.
3463
+ *
3462
3464
  * @publicApi
3463
3465
  */
3464
3466
  export declare interface InjectorType<T> extends Type<T> {
3465
- /**
3466
- * Opaque type whose structure is highly version dependent. Do not rely on any properties.
3467
- */
3468
- ɵinj: never;
3467
+ ɵfac?: unknown;
3468
+ ɵinj: unknown;
3469
3469
  }
3470
3470
 
3471
3471
  /**
@@ -3682,7 +3682,7 @@ export declare interface IterableDifferFactory {
3682
3682
  */
3683
3683
  export declare class IterableDiffers {
3684
3684
  /** @nocollapse */
3685
- static ɵprov: never;
3685
+ static ɵprov: unknown;
3686
3686
  /**
3687
3687
  * @deprecated v4.0.0 - Should be private
3688
3688
  */
@@ -3829,7 +3829,7 @@ export declare interface KeyValueDifferFactory {
3829
3829
  */
3830
3830
  export declare class KeyValueDiffers {
3831
3831
  /** @nocollapse */
3832
- static ɵprov: never;
3832
+ static ɵprov: unknown;
3833
3833
  /**
3834
3834
  * @deprecated v4.0.0 - Should be private.
3835
3835
  */
@@ -5142,20 +5142,19 @@ declare type PipeDefListOrFactory = (() => PipeDefList) | PipeDefList;
5142
5142
  *
5143
5143
  * @usageNotes
5144
5144
  *
5145
- * In the following example, `RepeatPipe` repeats a given value a given number of times.
5145
+ * In the following example, `TruncatePipe` returns the shortened value with an added ellipses.
5146
5146
  *
5147
- * ```ts
5148
- * import {Pipe, PipeTransform} from '@angular/core';
5147
+ * <code-example path="core/ts/pipes/simple_truncate.ts" header="simple_truncate.ts"></code-example>
5149
5148
  *
5150
- * @Pipe({name: 'repeat'})
5151
- * export class RepeatPipe implements PipeTransform {
5152
- * transform(value: any, times: number) {
5153
- * return value.repeat(times);
5154
- * }
5155
- * }
5156
- * ```
5149
+ * Invoking `{{ 'It was the best of times' | truncate }}` in a template will produce `It was...`.
5157
5150
  *
5158
- * Invoking `{{ 'ok' | repeat:3 }}` in a template produces `okokok`.
5151
+ * In the following example, `TruncatePipe` takes parameters that sets the truncated length and the
5152
+ * string to append with.
5153
+ *
5154
+ * <code-example path="core/ts/pipes/truncate.ts" header="truncate.ts"></code-example>
5155
+ *
5156
+ * Invoking `{{ 'It was the best of times' | truncate:4:'....' }}` in a template will produce `It
5157
+ * was the best....`.
5159
5158
  *
5160
5159
  * @publicApi
5161
5160
  */
@@ -5168,7 +5167,7 @@ export declare interface PipeTransform {
5168
5167
  * consumable for rendering.
5169
5168
  */
5170
5169
  declare interface PipeType<T> extends Type<T> {
5171
- ɵpipe: never;
5170
+ ɵpipe: unknown;
5172
5171
  }
5173
5172
 
5174
5173
  declare type PipeTypeList = (PipeType<any> | Type<any>)[];
@@ -6497,7 +6496,7 @@ declare const SANITIZER = 12;
6497
6496
  export declare abstract class Sanitizer {
6498
6497
  abstract sanitize(context: SecurityContext, value: {} | string | null): string | null;
6499
6498
  /** @nocollapse */
6500
- static ɵprov: never;
6499
+ static ɵprov: unknown;
6501
6500
  }
6502
6501
 
6503
6502
  /**
@@ -10028,7 +10027,7 @@ export declare function ɵcompileDirective(type: Type<any>, directive: Directive
10028
10027
  export declare function ɵcompileNgModule(moduleType: Type<any>, ngModule?: NgModule): void;
10029
10028
 
10030
10029
  /**
10031
- * Compiles and adds the `ɵmod` and `ɵinj` properties to the module class.
10030
+ * Compiles and adds the `ɵmod`, `ɵfac` and `ɵinj` properties to the module class.
10032
10031
  *
10033
10032
  * It's possible to compile a module via this API which will allow duplicate declarations in its
10034
10033
  * root.
@@ -10142,7 +10141,7 @@ export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
10142
10141
  * Used to store the result of `noSideEffects` function so that it is not removed by closure
10143
10142
  * compiler. The property should never be read.
10144
10143
  */
10145
- readonly _?: never;
10144
+ readonly _?: unknown;
10146
10145
  }
10147
10146
 
10148
10147
  /**
@@ -10150,7 +10149,7 @@ export declare interface ɵComponentDef<T> extends ɵDirectiveDef<T> {
10150
10149
  * consumable for rendering.
10151
10150
  */
10152
10151
  export declare interface ɵComponentType<T> extends Type<T> {
10153
- ɵcmp: never;
10152
+ ɵcmp: unknown;
10154
10153
  }
10155
10154
 
10156
10155
 
@@ -10352,8 +10351,8 @@ export declare interface ɵDirectiveDef<T> {
10352
10351
  * consumable for rendering.
10353
10352
  */
10354
10353
  export declare interface ɵDirectiveType<T> extends Type<T> {
10355
- ɵdir: never;
10356
- ɵfac: () => T;
10354
+ ɵdir: unknown;
10355
+ ɵfac: unknown;
10357
10356
  }
10358
10357
 
10359
10358
  export declare function ɵeld(checkIndex: number, flags: ɵNodeFlags, matchedQueriesDsl: null | [string | number, ɵQueryValueType][], ngContentIndex: null | number, childCount: number, namespaceAndName: string | null, fixedAttrs?: null | [string, string][], bindings?: null | [ɵBindingFlags, string, string | SecurityContext | null][], outputs?: null | ([string, string])[], handleEvent?: null | ElementHandleEventFn, componentView?: null | ViewDefinitionFactory, componentRendererType?: RendererType2 | null): NodeDef;
@@ -12287,7 +12286,7 @@ export declare function ɵɵdefineComponent<T>(componentDefinition: {
12287
12286
  * The set of schemas that declare elements to be allowed in the component's template.
12288
12287
  */
12289
12288
  schemas?: SchemaMetadata[] | null;
12290
- }): never;
12289
+ }): unknown;
12291
12290
 
12292
12291
  /**
12293
12292
  * Create a directive definition object.
@@ -12453,7 +12452,7 @@ export declare function ɵɵdefineInjectable<T>(opts: {
12453
12452
  token: unknown;
12454
12453
  providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
12455
12454
  factory: () => T;
12456
- }): never;
12455
+ }): unknown;
12457
12456
 
12458
12457
  /**
12459
12458
  * Construct an `InjectorDef` which configures an injector.
@@ -12463,9 +12462,6 @@ export declare function ɵɵdefineInjectable<T>(opts: {
12463
12462
  *
12464
12463
  * Options:
12465
12464
  *
12466
- * * `factory`: an `InjectorType` is an instantiable type, so a zero argument `factory` function to
12467
- * create the type must be provided. If that factory function needs to inject arguments, it can
12468
- * use the `inject` function.
12469
12465
  * * `providers`: an optional array of providers to add to the injector. Each provider must
12470
12466
  * either have a factory or point to a type which has a `ɵprov` static property (the
12471
12467
  * type must be an `InjectableType`).
@@ -12476,10 +12472,9 @@ export declare function ɵɵdefineInjectable<T>(opts: {
12476
12472
  * @codeGenApi
12477
12473
  */
12478
12474
  export declare function ɵɵdefineInjector(options: {
12479
- factory: () => any;
12480
12475
  providers?: any[];
12481
12476
  imports?: any[];
12482
- }): never;
12477
+ }): unknown;
12483
12478
 
12484
12479
  /**
12485
12480
  * @codeGenApi
@@ -12502,7 +12497,7 @@ export declare function ɵɵdefineNgModule<T>(def: {
12502
12497
  schemas?: SchemaMetadata[] | null;
12503
12498
  /** Unique ID for the module that is used with `getModuleFactory`. */
12504
12499
  id?: string | null;
12505
- }): never;
12500
+ }): unknown;
12506
12501
 
12507
12502
  /**
12508
12503
  * Create a pipe definition object.
@@ -12527,7 +12522,7 @@ export declare function ɵɵdefinePipe<T>(pipeDef: {
12527
12522
  type: Type<T>;
12528
12523
  /** Whether the pipe is pure. */
12529
12524
  pure?: boolean;
12530
- }): never;
12525
+ }): unknown;
12531
12526
 
12532
12527
  /**
12533
12528
  * @codeGenApi
@@ -12695,11 +12690,6 @@ export declare type ɵɵFactoryDef<T, CtorDependencies extends CtorDependency[]>
12695
12690
  */
12696
12691
  export declare function ɵɵgetCurrentView(): OpaqueViewState;
12697
12692
 
12698
- /**
12699
- * @codeGenApi
12700
- */
12701
- export declare function ɵɵgetFactoryOf<T>(type: Type<any>): FactoryFn<T> | null;
12702
-
12703
12693
  /**
12704
12694
  * @codeGenApi
12705
12695
  */
@@ -12926,7 +12916,6 @@ export declare function ɵɵinjectAttribute(attrNameToInject: string): string |
12926
12916
  * @codeGenApi
12927
12917
  */
12928
12918
  export declare interface ɵɵInjectorDef<T> {
12929
- factory: () => T;
12930
12919
  providers: (Type<any> | ValueProvider | ExistingProvider | FactoryProvider | ConstructorProvider | StaticClassProvider | ClassProvider | any[])[];
12931
12920
  imports: (InjectorType<any> | InjectorTypeWithProviders<any>)[];
12932
12921
  }
@@ -14006,7 +13995,7 @@ export declare function ɵɵsetNgModuleScope(type: any, scope: {
14006
13995
  * module.
14007
13996
  */
14008
13997
  exports?: Type<any>[] | (() => Type<any>[]);
14009
- }): void;
13998
+ }): unknown;
14010
13999
 
14011
14000
  /**
14012
14001
  * Update style bindings using an object literal on an element.