Skip to content

Commit e5973b8

Browse files
committed
Add string-literal completion test for jsdoc
1 parent f8103b5 commit e5973b8

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/// <reference path='fourslash.ts'/>
2+
// @allowJs: true
3+
// @Filename: in.js
4+
/////** I am documentation
5+
//// * @param {'literal'} p1
6+
//// * @param {"literal"} p2
7+
//// * @param {'other1' | 'other2'} p3
8+
//// * @param {'literal' | number} p4
9+
//// */
10+
////function f(p1, p2, p3, p4) {
11+
//// return p1 + p2 + p3 + p4 + '.';
12+
////}
13+
////f/*1*/('literal', 'literal', "o/*2*/ther1", 12);
14+
15+
goTo.marker('1');
16+
verify.quickInfoExists();
17+
verify.quickInfoIs('function f(p1: "literal", p2: "literal", p3: "other1" | "other2", p4: "literal" | number): string', 'I am documentation');
18+
19+
goTo.marker('2');
20+
verify.completionListContains("other1");
21+
verify.completionListContains("other2");
22+
verify.memberListCount(2);

0 commit comments

Comments
 (0)