@@ -38,6 +38,7 @@ verify.completions({
38
38
includeCompletionsWithInsertText : true ,
39
39
includeCompletionsWithSnippetText : false ,
40
40
includeCompletionsWithObjectLiteralMethodSnippets : true ,
41
+ includeCompletionsWithLabelDetails : true ,
41
42
} ,
42
43
includes : [
43
44
{
@@ -51,6 +52,9 @@ verify.completions({
51
52
completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "bar" ) ) ,
52
53
source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
53
54
insertText : "bar(x: number): void {\n}," ,
55
+ labelDetails : {
56
+ detail : "(x: number): void" ,
57
+ } ,
54
58
} ,
55
59
] ,
56
60
} ) ;
@@ -60,6 +64,7 @@ verify.completions({
60
64
includeCompletionsWithInsertText : true ,
61
65
includeCompletionsWithSnippetText : false ,
62
66
includeCompletionsWithObjectLiteralMethodSnippets : true ,
67
+ includeCompletionsWithLabelDetails : true ,
63
68
} ,
64
69
includes : [
65
70
{
@@ -73,6 +78,9 @@ verify.completions({
73
78
completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "bar" ) ) ,
74
79
source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
75
80
insertText : "bar(x: number): void {\n}," ,
81
+ labelDetails : {
82
+ detail : "(x: number): void" ,
83
+ } ,
76
84
} ,
77
85
{
78
86
name : "foo" ,
@@ -85,6 +93,9 @@ verify.completions({
85
93
completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "foo" ) ) ,
86
94
source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
87
95
insertText : "foo(x: string): string {\n}," ,
96
+ labelDetails : {
97
+ detail : "(x: string): string" ,
98
+ } ,
88
99
} ,
89
100
] ,
90
101
} ) ;
@@ -110,6 +121,7 @@ verify.completions({
110
121
includeCompletionsWithInsertText : true ,
111
122
includeCompletionsWithSnippetText : false ,
112
123
includeCompletionsWithObjectLiteralMethodSnippets : true ,
124
+ includeCompletionsWithLabelDetails : true ,
113
125
} ,
114
126
includes : [
115
127
{
@@ -123,6 +135,9 @@ verify.completions({
123
135
completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "\"space bar\"" ) ) ,
124
136
source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
125
137
insertText : "\"space bar\"(): string {\n}," ,
138
+ labelDetails : {
139
+ detail : "(): string" ,
140
+ } ,
126
141
} ,
127
142
] ,
128
143
} ) ;
@@ -132,6 +147,7 @@ verify.completions({
132
147
includeCompletionsWithInsertText : true ,
133
148
includeCompletionsWithSnippetText : true ,
134
149
includeCompletionsWithObjectLiteralMethodSnippets : true ,
150
+ includeCompletionsWithLabelDetails : true ,
135
151
} ,
136
152
includes : [
137
153
{
@@ -146,6 +162,33 @@ verify.completions({
146
162
source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
147
163
isSnippet : true ,
148
164
insertText : "bar(x: number): void {\n $0\n}," ,
165
+ labelDetails : {
166
+ detail : "(x: number): void" ,
167
+ } ,
168
+ } ,
169
+ ] ,
170
+ } ) ;
171
+ verify . completions ( {
172
+ marker : "a" ,
173
+ preferences : {
174
+ includeCompletionsWithInsertText : true ,
175
+ includeCompletionsWithSnippetText : true ,
176
+ includeCompletionsWithObjectLiteralMethodSnippets : true ,
177
+ includeCompletionsWithLabelDetails : false ,
178
+ } ,
179
+ includes : [
180
+ {
181
+ name : "bar" ,
182
+ sortText : completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "bar" ) ,
183
+ insertText : undefined ,
184
+ } ,
185
+ {
186
+ name : "bar(x: number): void" ,
187
+ sortText : completion . SortText . SortBelow (
188
+ completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "bar" ) ) ,
189
+ source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
190
+ isSnippet : true ,
191
+ insertText : "bar(x: number): void {\n $0\n}," ,
149
192
} ,
150
193
] ,
151
194
} ) ;
0 commit comments