Skip to content

Commit 379ca11

Browse files
Merge pull request #3697 from Microsoft/testObjectBindingCompletionWithUnionTypes
Add test case for completion when destructuring from a union type.
2 parents b2a871d + f7ba718 commit 379ca11

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/// <reference path='fourslash.ts'/>
2+
3+
////interface I {
4+
//// x: number;
5+
//// y: string;
6+
//// z: boolean;
7+
////}
8+
////
9+
////interface J {
10+
//// x: string;
11+
//// y: string;
12+
////}
13+
////
14+
////let { /**/ }: I | J = { x: 10 };
15+
16+
goTo.marker();
17+
verify.completionListContains("x");
18+
verify.completionListContains("y");
19+
verify.not.completionListContains("z");

0 commit comments

Comments
 (0)