-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed as not planned
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
π Search Terms
TS 2869
Right operand of ?? is unreachable because the left operand is never nullish
π Version & Regression Information
TS2869 was introduced in v5.6 and all version until 5.9-nightly are affected.
β― Playground Link
π» Code
true ?? false; // detected
(() => true) ?? false; // detected
(() => true)() ?? false // not detected
π Actual behavior
(() => true)() ?? false
does not report any errors
π Expected behavior
(() => true)() ?? false
~~~~~~~~~~~~~~
^ Right operand of ?? is unreachable because the left operand is never nullish
Additional information about the issue
No response
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug