-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
During the integration of injection-js into the refactoring of a personal side project, I noticed, that consumers are currently not able to use the (previously introduced) inject() function with abstract types.
A quick look at the source and a comparison with the current implementations of Angular, revealed that the function signature is currently not supporting abstract types.
| export function inject<T>(token: Type<T> | InjectionToken<T>): T { |
Angulars provider token type is going to add proper support for this. To be more specific, the AbstractType<T> typing below will do so.
export interface AbstractType<T> extends Function {
prototype: T;
}I'll be happy to provide a fix PR for it in a little while. Nevertheless, I created this issue for the sake of it.
Best regards ✌
Metadata
Metadata
Assignees
Labels
No labels