Skip to content

Bug with conditional types and constraints #23843

Description

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.

Activity

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

Metadata

Metadata

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