Bad parsing behavior for generic arrow type arguments · Issue #23996 · microsoft/TypeScript · GitHub
Skip to content

Bad parsing behavior for generic arrow type arguments #23996

Description

// No parse error.
type Foo = ReturnType< <T>(x: T) => T>;

// Parse error.
type Bar = ReturnType<<T>(x: T) => T>;

Expected: No parse error, Foo and Bar are equivalent.
Actual: Parse errors, Bar ends up as nonsense (any) because of a parse error.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions