Skip to content

Commit 76e721f

Browse files
Added tests.
1 parent 5ab8bd8 commit 76e721f

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
interface Foo {
2+
a: string;
3+
b: number;
4+
};
5+
6+
interface Bar {
7+
b: string;
8+
}
9+
10+
interface Other {
11+
totallyUnrelatedProperty: number;
12+
}
13+
14+
export let x = { a: '', b: '' };
15+
16+
declare function f(x: Foo | Other): any;
17+
18+
f(x);
19+
f({ a: '', b: '' })
20+
21+
declare function g(x: Bar | Other): any;
22+
23+
g(x);
24+
g({ a: '', b: '' })
25+
26+
declare function h(x: Foo | Bar | Other): any;
27+
28+
h(x);
29+
h({ a: '', b: '' })

0 commit comments

Comments
 (0)