-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
Description
π Search Terms
never nullish
π Version & Regression Information
- This is the behavior in every version I tried
β― Playground Link
π» Code
class X {
constructor() {
const p = new.target ?? 32;
}
}
π Actual behavior
Incorrectly says
right operand of ?? is unreachable because the left operand is never nullish
π Expected behavior
No error
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue