mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-03-15 14:05:47 -05:00
Accept new baselines
This commit is contained in:
@@ -228,4 +228,14 @@ tests/cases/conformance/types/keyof/keyofAndIndexedAccess2.ts(108,5): error TS23
|
||||
this["a"] = "b";
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #31385
|
||||
|
||||
type Foo<T> = { [key: string]: { [K in keyof T]: K }[keyof T] };
|
||||
|
||||
type Bar<T> = { [key: string]: { [K in keyof T]: [K] }[keyof T] };
|
||||
|
||||
type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
|
||||
|
||||
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
|
||||
|
||||
@@ -145,6 +145,16 @@ export class c {
|
||||
this["a"] = "b";
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #31385
|
||||
|
||||
type Foo<T> = { [key: string]: { [K in keyof T]: K }[keyof T] };
|
||||
|
||||
type Bar<T> = { [key: string]: { [K in keyof T]: [K] }[keyof T] };
|
||||
|
||||
type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
|
||||
|
||||
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
|
||||
|
||||
|
||||
//// [keyofAndIndexedAccess2.js]
|
||||
|
||||
@@ -517,3 +517,47 @@ export class c {
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #31385
|
||||
|
||||
type Foo<T> = { [key: string]: { [K in keyof T]: K }[keyof T] };
|
||||
>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess2.ts, 145, 1))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 149, 9))
|
||||
>key : Symbol(key, Decl(keyofAndIndexedAccess2.ts, 149, 17))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 149, 34))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 149, 9))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 149, 34))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 149, 9))
|
||||
|
||||
type Bar<T> = { [key: string]: { [K in keyof T]: [K] }[keyof T] };
|
||||
>Bar : Symbol(Bar, Decl(keyofAndIndexedAccess2.ts, 149, 64))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 151, 9))
|
||||
>key : Symbol(key, Decl(keyofAndIndexedAccess2.ts, 151, 17))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 151, 34))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 151, 9))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 151, 34))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 151, 9))
|
||||
|
||||
type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
|
||||
>Baz : Symbol(Baz, Decl(keyofAndIndexedAccess2.ts, 151, 66))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 153, 9))
|
||||
>Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 153, 11))
|
||||
>Foo : Symbol(Foo, Decl(keyofAndIndexedAccess2.ts, 145, 1))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 153, 9))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 153, 35))
|
||||
>Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 153, 11))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 153, 9))
|
||||
>Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 153, 11))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 153, 35))
|
||||
|
||||
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
|
||||
>Qux : Symbol(Qux, Decl(keyofAndIndexedAccess2.ts, 153, 60))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 155, 9))
|
||||
>Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 155, 11))
|
||||
>Bar : Symbol(Bar, Decl(keyofAndIndexedAccess2.ts, 149, 64))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 155, 9))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 155, 35))
|
||||
>Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 155, 11))
|
||||
>T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 155, 9))
|
||||
>Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 155, 11))
|
||||
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 155, 35))
|
||||
|
||||
|
||||
@@ -517,3 +517,19 @@ export class c {
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #31385
|
||||
|
||||
type Foo<T> = { [key: string]: { [K in keyof T]: K }[keyof T] };
|
||||
>Foo : Foo<T>
|
||||
>key : string
|
||||
|
||||
type Bar<T> = { [key: string]: { [K in keyof T]: [K] }[keyof T] };
|
||||
>Bar : Bar<T>
|
||||
>key : string
|
||||
|
||||
type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
|
||||
>Baz : Baz<T, Q>
|
||||
|
||||
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
|
||||
>Qux : Qux<T, Q>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user