Closed
Description
Found helping @bterlson with something.
Basically, the main issue is that as soon as I use an indexed access type with a unique symbol
on a type parameter, things fall apart.
declare const fooProp: unique symbol;
export interface Foo<T> {
[fooProp]: T
}
function f<T extends Foo<any>>(x: T) {
const abc = x[fooProp] // expected: 'T[typeof fooProp]'; actual: 'any'
/**
* Expected: no error
* Actual: Type 'unique symbol' cannot be used to index type 'T'.
*/
const def: T[typeof fooProp] = x[fooProp]
}