Merge pull request #23966 from Microsoft/fixIndexedAccessAnyConstraint

Fix indexed access with 'any' constraint
This commit is contained in:
Anders Hejlsberg
2018-05-08 12:21:00 -07:00
committed by GitHub
5 changed files with 68 additions and 1 deletions

View File

@@ -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]>;