Skip to content

Commit 1450908

Browse files
Added tests for union types with identical doc comments.
1 parent 1a88430 commit 1450908

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
[
2+
{
3+
"marker": {
4+
"fileName": "/tests/cases/fourslash/quickInfoOnUnionPropertiesWithIdenticalJSDocComments01.ts",
5+
"position": 746
6+
},
7+
"quickInfo": {
8+
"kind": "property",
9+
"kindModifiers": "optional",
10+
"textSpan": {
11+
"start": 746,
12+
"length": 8
13+
},
14+
"displayParts": [
15+
{
16+
"text": "(",
17+
"kind": "punctuation"
18+
},
19+
{
20+
"text": "property",
21+
"kind": "text"
22+
},
23+
{
24+
"text": ")",
25+
"kind": "punctuation"
26+
},
27+
{
28+
"text": " ",
29+
"kind": "space"
30+
},
31+
{
32+
"text": "language",
33+
"kind": "propertyName"
34+
},
35+
{
36+
"text": "?",
37+
"kind": "punctuation"
38+
},
39+
{
40+
"text": ":",
41+
"kind": "punctuation"
42+
},
43+
{
44+
"text": " ",
45+
"kind": "space"
46+
},
47+
{
48+
"text": "string",
49+
"kind": "keyword"
50+
}
51+
],
52+
"documentation": [
53+
{
54+
"text": "A language id, like `typescript`.",
55+
"kind": "text"
56+
},
57+
{
58+
"text": "\n",
59+
"kind": "lineBreak"
60+
},
61+
{
62+
"text": "A language id, like `typescript`.",
63+
"kind": "text"
64+
},
65+
{
66+
"text": "\n",
67+
"kind": "lineBreak"
68+
},
69+
{
70+
"text": "A language id, like `typescript`.",
71+
"kind": "text"
72+
}
73+
]
74+
}
75+
}
76+
]
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
////export type DocumentFilter = {
4+
//// /** A language id, like `typescript`. */
5+
//// language: string;
6+
//// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
7+
//// scheme?: string;
8+
//// /** A glob pattern, like `*.{ts,js}`. */
9+
//// pattern?: string;
10+
////} | {
11+
//// /** A language id, like `typescript`. */
12+
//// language?: string;
13+
//// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
14+
//// scheme: string;
15+
//// /** A glob pattern, like `*.{ts,js}`. */
16+
//// pattern?: string;
17+
////} | {
18+
//// /** A language id, like `typescript`. */
19+
//// language?: string;
20+
//// /** A Uri [scheme](#Uri.scheme), like `file` or `untitled`. */
21+
//// scheme?: string;
22+
//// /** A glob pattern, like `*.{ts,js}`. */
23+
//// pattern: string;
24+
////};
25+
////
26+
////declare let x: DocumentFilter;
27+
////x./**/language
28+
29+
verify.baselineQuickInfo();

0 commit comments

Comments
 (0)