This should help applications prepare for v2 migration, or if they like, stay with v1 without having to worry about Typescript.
improve container.get() typings so that .get(NewInstance.of())/Lazy/Factory etc... will give correct type inference.
fix the typings of @lazy/@newInstace as the existing typings are incorrect, the type of the keys are used to validate the target class of the decorator
Thanks @m-gallesio for requesting this.
Closes #227
cc @thomas-darling for your awareness since you are with one of the big v1 applications that I'm aware of.
As per the request at https://github.com/aurelia/dependency-injection/issues/227, a backport of resolve is provided in this PR.
This should help applications prepare for v2 migration, or if they like, stay with v1 without having to worry about Typescript.
container.get()
typings so that.get(NewInstance.of())
/Lazy
/Factory
etc... will give correct type inference.@lazy
/@newInstace
as the existing typings are incorrect, the type of the keys are used to validate the target class of the decoratorThanks @m-gallesio for requesting this.
Closes #227
cc @thomas-darling for your awareness since you are with one of the big v1 applications that I'm aware of.