Skip to content

Generic class-scoped arrow functions lack access to class-level type reflections #2320

Closed
@Oblarg

Description

@Oblarg

When defining generic class functions whose lower bounds depend on class-level generics, the lower bound types will resolve/expand based on the value of those generics. For example, consider this (very lengthy) string literal union:

image

However, if a similar function is defined with an arrow function, the lower bound does not expand and is instead broadened to just string:

image

The type constraints are identical between these two functions; they differ only in that the former is a class method and the latter is an arrow function.

It would be really nice if the rendering were consistent here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedContributions are especially encouraged

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions