@angular/core 12.2.9 → 12.2.13
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/bundles/core-testing.umd.js +1 -1
- package/bundles/core.umd.js +23 -11
- package/bundles/core.umd.js.map +1 -1
- package/core.d.ts +12 -5
- package/core.metadata.json +1 -1
- package/esm2015/index.js +6 -5
- package/esm2015/src/di/injection_token.js +12 -5
- package/esm2015/src/render3/di.js +3 -3
- package/esm2015/src/render3/error_code.js +2 -5
- package/esm2015/src/render3/error_details_base_url.js +16 -0
- package/esm2015/src/version.js +1 -1
- package/fesm2015/core.js +30 -11
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/testing.js +1 -1
- package/package.json +1 -1
- package/src/r3_symbols.d.ts +12 -5
- package/testing/testing.d.ts +1 -1
- package/testing.d.ts +1 -1
package/fesm2015/testing.js
CHANGED
package/package.json
CHANGED
package/src/r3_symbols.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license Angular v12.2.
|
|
2
|
+
* @license Angular v12.2.13
|
|
3
3
|
* (c) 2010-2021 Google LLC. https://angular.io/
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -463,11 +463,11 @@ declare enum InjectFlags {
|
|
|
463
463
|
* parameterized type.
|
|
464
464
|
*
|
|
465
465
|
* `InjectionToken` is parameterized on `T` which is the type of object which will be returned by
|
|
466
|
-
* the `Injector`. This provides additional level of type safety.
|
|
466
|
+
* the `Injector`. This provides an additional level of type safety.
|
|
467
467
|
*
|
|
468
468
|
* ```
|
|
469
469
|
* interface MyInterface {...}
|
|
470
|
-
*
|
|
470
|
+
* const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));
|
|
471
471
|
* // myInterface is inferred to be MyInterface.
|
|
472
472
|
* ```
|
|
473
473
|
*
|
|
@@ -475,14 +475,15 @@ declare enum InjectFlags {
|
|
|
475
475
|
* (possibly by creating) a default value of the parameterized type `T`. This sets up the
|
|
476
476
|
* `InjectionToken` using this factory as a provider as if it was defined explicitly in the
|
|
477
477
|
* application's root injector. If the factory function, which takes zero arguments, needs to inject
|
|
478
|
-
* dependencies, it can do so using the `inject` function.
|
|
478
|
+
* dependencies, it can do so using the `inject` function.
|
|
479
|
+
* As you can see in the Tree-shakable InjectionToken example below.
|
|
479
480
|
*
|
|
480
481
|
* Additionally, if a `factory` is specified you can also specify the `providedIn` option, which
|
|
481
482
|
* overrides the above behavior and marks the token as belonging to a particular `@NgModule`. As
|
|
482
483
|
* mentioned above, `'root'` is the default value for `providedIn`.
|
|
483
484
|
*
|
|
484
485
|
* @usageNotes
|
|
485
|
-
* ### Basic
|
|
486
|
+
* ### Basic Examples
|
|
486
487
|
*
|
|
487
488
|
* ### Plain InjectionToken
|
|
488
489
|
*
|
|
@@ -498,6 +499,12 @@ declare enum InjectFlags {
|
|
|
498
499
|
declare class InjectionToken<T> {
|
|
499
500
|
protected _desc: string;
|
|
500
501
|
readonly ɵprov: unknown;
|
|
502
|
+
/**
|
|
503
|
+
* @param _desc Description for the token,
|
|
504
|
+
* used only for debugging purposes,
|
|
505
|
+
* it should but does not need to be unique
|
|
506
|
+
* @param options Options for the token's usage, as described above
|
|
507
|
+
*/
|
|
501
508
|
constructor(_desc: string, options?: {
|
|
502
509
|
providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
|
|
503
510
|
factory: () => T;
|
package/testing/testing.d.ts
CHANGED
package/testing.d.ts
CHANGED