Acknowledgement
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;
}
Acknowledgement
Comment
In TypeScript 6, I could get the tuple element names
fooandbaroff of the type for the following type parameter constraint withtype.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.