mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
Merge pull request #23966 from Microsoft/fixIndexedAccessAnyConstraint
Fix indexed access with 'any' constraint
This commit is contained in:
@@ -629,3 +629,11 @@ class Unbounded<T> {
|
||||
let y: {} | undefined | null = x;
|
||||
}
|
||||
}
|
||||
|
||||
// Repro from #23940
|
||||
|
||||
interface I7 {
|
||||
x: any;
|
||||
}
|
||||
type Foo7<T extends number> = T;
|
||||
declare function f7<K extends keyof I7>(type: K): Foo7<I7[K]>;
|
||||
|
||||
Reference in New Issue
Block a user