Skip to content

Bug with conditional types and constraints #23843

Closed
@SimonMeskens

Description

@SimonMeskens
type Weird = (<U extends boolean>(a: U) => never) extends 
    (<U extends true>(a: U) => never) ? never : never;

This type puts the type checker in some sort of weird state where it's never narrowed into anything useful. I assume the proper type should be boolean never.

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