Do not do any reduction (even if it contains any) to the union type when getting contextual type

Fixes #27975
This commit is contained in:
Sheetal Nandi
2018-10-19 15:59:50 -07:00
parent 69b1cb5bac
commit 71d8961ba0
5 changed files with 90 additions and 29 deletions

View File

@@ -0,0 +1,6 @@
interface I {
[index: number]: any;
someOtherProperty: number;
}
function f(args: ["a"] | I) { }
f(["a"]);