Union this-types of unioned call signatures

And and tests and baselines
This commit is contained in:
Nathan Shively-Sanders
2016-03-08 13:05:00 -08:00
parent e7aa7e4958
commit 482acccada
5 changed files with 116 additions and 8 deletions

View File

@@ -0,0 +1,12 @@
// @strictThis: true
interface Real {
method(n: number): void;
data: string;
}
interface Fake {
method(n: number): void;
data: number;
}
function test(r: Real | Fake) {
r.method(12);
}