Skip to content

4.8.2 -> 4.8.3 regression: type narrowing fails with a discriminant type of neverΒ #50716

Closed
@shigma

Description

@shigma

Bug Report

πŸ”Ž Search Terms

regression, narrow, union, control flow

πŸ•— Version & Regression Information

  • This changed between versions 4.8.2 and 4.8.3

⏯ Playground Link

Note: playground does not have 4.8.3 support

Playground link with relevant code

πŸ’» Code

image

image

πŸ™ Actual behavior

4.8.3

image

πŸ™‚ Expected behavior

4.8.2

image

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issueHas ReproThis issue has compiler-backed repros: https://aka.ms/ts-repros

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions