diff --git a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts index a99c2b0a7a106..898648cea44fe 100644 --- a/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts +++ b/tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts @@ -147,3 +147,13 @@ export class c { this["a"] = "b"; } } + +// Repro from #31385 + +type Foo = { [key: string]: { [K in keyof T]: K }[keyof T] }; + +type Bar = { [key: string]: { [K in keyof T]: [K] }[keyof T] }; + +type Baz> = { [K in keyof Q]: T[Q[K]] }; + +type Qux> = { [K in keyof Q]: T[Q[K]["0"]] };