mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(core): avoid false-positive deprecation when using InjectionToken with factory only
Prevents the deprecation warning that was incorrectly triggered when defining an InjectionToken with only a `factory`, which correctly defaults to the `root` scope.
This commit is contained in:
committed by
Alex Rickabaugh
parent
16364514e3
commit
4f6014a756
@@ -74,7 +74,7 @@ export class InjectionToken<T> {
|
||||
constructor(
|
||||
_desc: string,
|
||||
options: {
|
||||
providedIn?: Type<any> | 'any';
|
||||
providedIn: Type<any> | 'any';
|
||||
factory: () => T;
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user