-
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
Wrong warning : ng8102 #44859
Comments
The problem in this situation is more related to |
What are all the types involved in I guess I am asking for a reproduction. |
I try to reproduce on CodeSandbox without success. My tsconfig file |
No, Label can't be null |
I will have a look at this. |
This is broken when there's an |
There's also an issue when |
13.2.1 is out which should have improved things. I'll keep this open for a while, please report situations where you believe the rule is incorrect below. |
Hello,
@Input() btnLabel?: string; {{ btnLabel ?? 'Validate' }} |
@FabienCH Please update to latest Angular. |
Sorry I thought we had the latest. It works fine now. |
Closing as fixed. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Which @angular/* package(s) are the source of the bug?
compiler
Is this a regression?
Yes
Description
Wrong warning in this case
Exemple :
{{element.CurrentLock?.Clinician?.Label ?? '--'}}warning NG8102: The left side of this nullish coalescing operation does not include 'null' or 'undefined' in its type, therefore the '??' operator can be safely removed.
In this case CurrentLock and Clinician could be null
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in (run
ng version
)Anything else?
No response
The text was updated successfully, but these errors were encountered: