- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/@angular/core/core.d.ts
r59329aa re29cc2e 1 1 /** 2 * @license Angular v12.2. 92 * @license Angular v12.2.13 3 3 * (c) 2010-2021 Google LLC. https://angular.io/ 4 4 * License: MIT … … 3579 3579 * 3580 3580 * `InjectionToken` is parameterized on `T` which is the type of object which will be returned by 3581 * the `Injector`. This provides a dditional level of type safety.3581 * the `Injector`. This provides an additional level of type safety. 3582 3582 * 3583 3583 * ``` 3584 3584 * interface MyInterface {...} 3585 * varmyInterface = injector.get(new InjectionToken<MyInterface>('SomeToken'));3585 * const myInterface = injector.get(new InjectionToken<MyInterface>('SomeToken')); 3586 3586 * // myInterface is inferred to be MyInterface. 3587 3587 * ``` … … 3591 3591 * `InjectionToken` using this factory as a provider as if it was defined explicitly in the 3592 3592 * application's root injector. If the factory function, which takes zero arguments, needs to inject 3593 * dependencies, it can do so using the `inject` function. See below for an example. 3593 * dependencies, it can do so using the `inject` function. 3594 * As you can see in the Tree-shakable InjectionToken example below. 3594 3595 * 3595 3596 * Additionally, if a `factory` is specified you can also specify the `providedIn` option, which … … 3598 3599 * 3599 3600 * @usageNotes 3600 * ### Basic Example 3601 * ### Basic Examples 3601 3602 * 3602 3603 * ### Plain InjectionToken … … 3614 3615 protected _desc: string; 3615 3616 readonly ɵprov: unknown; 3617 /** 3618 * @param _desc Description for the token, 3619 * used only for debugging purposes, 3620 * it should but does not need to be unique 3621 * @param options Options for the token's usage, as described above 3622 */ 3616 3623 constructor(_desc: string, options?: { 3617 3624 providedIn?: Type<any> | 'root' | 'platform' | 'any' | null;
Note:
See TracChangeset
for help on using the changeset viewer.