-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check generic types when using ViewChild
/ContentChild
and through DI
#43253
Comments
This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list. You can find more details about the feature request process in our documentation. |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
This will be awesome! Correct me if I am wrong but that will allow typing context variables on content child template too. A very much needed feature |
This has always been on the list for template type-checking. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
@alxhub Any update on this? I can try to submit a PR provided with some hints |
Can it be done with the new signal queries? |
The new API for signals does not add any changes regarding this issue, namely, strict typing in DI |
@alxhub Any news concerning this? I am really waiting for this feature |
Which @angular/* package(s) are relevant/releated to the feature request?
compiler
Description
Imagine we have a parent component
NgxOptions<T>
and a childNgxOption<T>
, with the following definition:Proposed solution
It would be great to enforce type checking of components with a generic type when there is a relationship between them, such as
ViewChild
/ContentChild
or injectionAlternatives considered
Right now the strict checking only applied to templates. However, it is only implemented for inputs/outputs, not for generic types in components when they are related.
The text was updated successfully, but these errors were encountered: