Skip to content

fix(compiler-cli): unwrap expressions with type parameters in query read property#54647

Closed
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:54645/query-param-with-generic
Closed

fix(compiler-cli): unwrap expressions with type parameters in query read property#54647
crisbeto wants to merge 1 commit intoangular:mainfrom
crisbeto:54645/query-param-with-generic

Conversation

@crisbeto
Copy link
Member

Fixes that a query like viewChild('locator', {read: ElementRef<HTMLElement>}) would throw because we didn't account for expressions with type parameters.

I've also included support for parenthesized expressions and as expressions since it's pretty easy to support them.

Fixes #54645.

…ead property

Fixes that a query like `viewChild('locator', {read: ElementRef<HTMLElement>})` would throw because we didn't account for expressions with type parameters.

I've also included support for parenthesized expressions and `as` expressions since it's pretty easy to support them.

Fixes angular#54645.
@crisbeto crisbeto requested a review from devversion February 28, 2024 12:46
@pkozlowski-opensource pkozlowski-opensource added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Feb 28, 2024
@ngbot ngbot bot added this to the Backlog milestone Feb 28, 2024
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Feb 28, 2024
@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit ae7dbe4.

pkozlowski-opensource pushed a commit that referenced this pull request Feb 28, 2024
…ead property (#54647)

Fixes that a query like `viewChild('locator', {read: ElementRef<HTMLElement>})` would throw because we didn't account for expressions with type parameters.

I've also included support for parenthesized expressions and `as` expressions since it's pretty easy to support them.

Fixes #54645.

PR Close #54647
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Mar 30, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

viewChild function doesn't accept generic type for ElementRef

3 participants