Skip to content

Type narrowing bug in empty interfaces #18196

Closed
@chancancode

Description

@chancancode

Reproduction (turn on strictNullChecks to see the red line)

let x: {} = "";

if (!x) {
  // x is `never` O_O
}

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFixedA PR has been merged for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions