Skip to content

Uncalled function in binary expression not silenced by body usage #49155

@andrewbranch

Description

@andrewbranch

Found in #49142:

declare let isActive: boolean;
declare let onChange: () => void;

if (!isActive && onChange) onChange();

Expected: no error because onChange() is used in the conditional body.
Actual: always-truthy error in the if condition.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions