Skip to content

[API] labeledElementDeclarations is missing in TypeScript 7 #64105

Description

Acknowledgement

  • I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.

Comment

In TypeScript 6, I could get the tuple element names foo and bar off of the type for the following type parameter constraint with type.target.labeledElementDeclarations. This doesn't exist in TypeScript 7, and as far as I've been able to tell, there is no way to get these names with the current API surface.

export function gh1449<T extends [foo: any, bar?: any]>(a: T): T {
    return a;
}

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions