Added tests.

This commit is contained in:
Daniel Rosenwasser
2018-09-13 17:53:53 -07:00
parent 5ab8bd85ae
commit 76e721f389

View File

@@ -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: '' })