Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(compiler-cli): add extended diagnostic for invalid nullish coalescing #60279

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

Closed
wants to merge 1 commit into from

Conversation

mmalerba
Copy link
Contributor

@mmalerba mmalerba commented Mar 7, 2025

The semantics for nullish coalescing (??) in Javascript/Typescript
differ slightly from the semantics in Angular templates. Mixing nullish
coalescing with logical and/or without parentheses is an error in
Javascript. This PR adds an extended diagnostic that can be enabled to
treat it as an error in Angular templates as well.

@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: compiler Issues related to `ngc`, Angular's template compiler labels Mar 7, 2025
@ngbot ngbot bot added this to the Backlog milestone Mar 7, 2025
@mmalerba mmalerba added the target: major This PR is targeted for the next major release label Mar 17, 2025
@mmalerba mmalerba marked this pull request as ready for review March 17, 2025 15:02
@mmalerba mmalerba requested a review from crisbeto March 17, 2025 17:15
@pullapprove pullapprove bot requested review from alxhub and thePunderWoman March 17, 2025 21:26
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewed-for: public-api

@pullapprove pullapprove bot requested a review from atscott March 17, 2025 21:47
@mmalerba mmalerba added the merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note label Mar 18, 2025
@mmalerba
Copy link
Contributor Author

CARETAKER: patch cl/737806124

…scing

The semantics for nullish coalescing (`??`) in Javascript/Typescript
differ slightly from the semantics in Angular templates. Mixing nullish
coalescing with logical and/or without parentheses is an error in
Javascript. This PR adds an extended diagnostic that can be enabled to
treat it as an error in Angular templates as well.
@pullapprove pullapprove bot requested a review from crisbeto March 18, 2025 07:45
@pullapprove pullapprove bot requested a review from crisbeto March 18, 2025 15:27
Copy link
Member

@alxhub alxhub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: public-api

@mmalerba mmalerba added the action: merge The PR is ready for merge by the caretaker label Mar 18, 2025
Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewed-for: public-api

@pkozlowski-opensource
Copy link
Member

This PR was merged into the repository by commit bec1610.

The changes were merged into the following branches: main

@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 Apr 19, 2025
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: compiler Issues related to `ngc`, Angular's template compiler detected: feature PR contains a feature commit merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants