镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

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

Closed

Description

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

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