@@ -38,6 +38,7 @@ verify.completions({
3838 includeCompletionsWithInsertText : true ,
3939 includeCompletionsWithSnippetText : false ,
4040 includeCompletionsWithObjectLiteralMethodSnippets : true ,
41+ includeCompletionsWithLabelDetails : true ,
4142 } ,
4243 includes : [
4344 {
@@ -51,6 +52,9 @@ verify.completions({
5152 completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "bar" ) ) ,
5253 source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
5354 insertText : "bar(x: number): void {\n}," ,
55+ labelDetails : {
56+ detail : "(x: number): void" ,
57+ } ,
5458 } ,
5559 ] ,
5660} ) ;
@@ -60,6 +64,7 @@ verify.completions({
6064 includeCompletionsWithInsertText : true ,
6165 includeCompletionsWithSnippetText : false ,
6266 includeCompletionsWithObjectLiteralMethodSnippets : true ,
67+ includeCompletionsWithLabelDetails : true ,
6368 } ,
6469 includes : [
6570 {
@@ -73,6 +78,9 @@ verify.completions({
7378 completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "bar" ) ) ,
7479 source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
7580 insertText : "bar(x: number): void {\n}," ,
81+ labelDetails : {
82+ detail : "(x: number): void" ,
83+ } ,
7684 } ,
7785 {
7886 name : "foo" ,
@@ -85,6 +93,9 @@ verify.completions({
8593 completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "foo" ) ) ,
8694 source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
8795 insertText : "foo(x: string): string {\n}," ,
96+ labelDetails : {
97+ detail : "(x: string): string" ,
98+ } ,
8899 } ,
89100 ] ,
90101} ) ;
@@ -110,6 +121,7 @@ verify.completions({
110121 includeCompletionsWithInsertText : true ,
111122 includeCompletionsWithSnippetText : false ,
112123 includeCompletionsWithObjectLiteralMethodSnippets : true ,
124+ includeCompletionsWithLabelDetails : true ,
113125 } ,
114126 includes : [
115127 {
@@ -123,6 +135,9 @@ verify.completions({
123135 completion . SortText . ObjectLiteralProperty ( completion . SortText . LocationPriority , "\"space bar\"" ) ) ,
124136 source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
125137 insertText : "\"space bar\"(): string {\n}," ,
138+ labelDetails : {
139+ detail : "(): string" ,
140+ } ,
126141 } ,
127142 ] ,
128143} ) ;
@@ -132,6 +147,7 @@ verify.completions({
132147 includeCompletionsWithInsertText : true ,
133148 includeCompletionsWithSnippetText : true ,
134149 includeCompletionsWithObjectLiteralMethodSnippets : true ,
150+ includeCompletionsWithLabelDetails : true ,
135151 } ,
136152 includes : [
137153 {
@@ -146,6 +162,33 @@ verify.completions({
146162 source : completion . CompletionSource . ObjectLiteralMethodSnippet ,
147163 isSnippet : true ,
148164 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}," ,
149192 } ,
150193 ] ,
151194} ) ;
0 commit comments