Added tests.

This commit is contained in:
Daniel Rosenwasser
2018-11-26 12:02:17 -08:00
parent 7e07eef8bb
commit 2e860f4d01
@@ -0,0 +1,29 @@
interface Foo {
a: string;
b: number;
};
interface Bar {
b: string;
}
interface Other {
totallyUnrelatedProperty: number;
}
export let x = { a: '', b: '' };
declare function f(x: Foo | Other): any;
f(x);
f({ a: '', b: '' })
declare function g(x: Bar | Other): any;
g(x);
g({ a: '', b: '' })
declare function h(x: Foo | Bar | Other): any;
h(x);
h({ a: '', b: '' })