-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimebreaking changescore: dicross-cutting: typesfeatureIssue that requests a new featureIssue that requests a new feature
Milestone
Description
Which @angular/* package(s) are the source of the bug?
core
Is this a regression?
No
Description
inject()'s type description seems to be invalid:
angular/packages/core/src/di/injector_compatibility.ts
Lines 78 to 80 in 5cfde8b
| export function ɵɵinject<T>(token: ProviderToken<T>): T; | |
| export function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags): T|null; | |
| export function ɵɵinject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|null { |
Return type should be T | null only if flag is set to InjectFlags.Optional meaning that the signature should be something like this:
export function ɵɵinject<T>(token: ProviderToken<T>): T;
export function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags.Default | InjectFlags...): T;
export function ɵɵinject<T>(token: ProviderToken<T>, flags?: InjectFlags.Optional): T | null;
export function ɵɵinject<T>(token: ProviderToken<T>, flags = InjectFlags.Default): T|nullPlease provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run ng version)
No response
Anything else?
No response
samuelfernandez, ashobaty, DaSchTour, dario-piotrowicz, sheikalthaf and 2 more
Metadata
Metadata
Assignees
Labels
area: coreIssues related to the framework runtimeIssues related to the framework runtimebreaking changescore: dicross-cutting: typesfeatureIssue that requests a new featureIssue that requests a new feature