@@ -10,7 +10,7 @@ import { ASTNode, ObjectASTNode, PropertyASTNode } from '../jsonASTTypes';
1010import { parse as parseYAML } from '../parser/yamlParser07' ;
1111import { YAMLSchemaService } from './yamlSchemaService' ;
1212import { JSONSchema , JSONSchemaRef } from '../jsonSchema' ;
13- import { PromiseConstructor , Thenable , JSONWorkerContribution , CompletionsCollector } from 'vscode-json-languageservice' ;
13+ import { Thenable , CompletionsCollector } from 'vscode-json-languageservice' ;
1414import {
1515 CompletionItem ,
1616 CompletionItemKind ,
@@ -26,7 +26,6 @@ import { getLineOffsets, filterInvalidCustomTags, matchOffsetToDocument } from '
2626import { LanguageSettings } from '../yamlLanguageService' ;
2727import { ResolvedSchema } from 'vscode-json-languageservice/lib/umd/services/jsonSchemaService' ;
2828import { JSONCompletion } from 'vscode-json-languageservice/lib/umd/services/jsonCompletion' ;
29- import { ClientCapabilities } from 'vscode-languageserver-protocol' ;
3029import { stringifyObject , StringifySettings } from '../utils/json' ;
3130import { guessIndentation } from '../utils/indentationGuesser' ;
3231import { TextBuffer } from '../utils/textBuffer' ;
@@ -35,22 +34,14 @@ const localize = nls.loadMessageBundle();
3534
3635export class YAMLCompletion extends JSONCompletion {
3736 private schemaService : YAMLSchemaService ;
38- private promise : PromiseConstructor ;
3937 private customTags : Array < string > ;
4038 private completion : boolean ;
41- private supportsMarkdown : boolean | undefined ;
4239 private indentation : string ;
4340 private configuredIndentation : string | undefined ;
4441
45- constructor (
46- schemaService : YAMLSchemaService ,
47- contributions : JSONWorkerContribution [ ] = [ ] ,
48- promiseConstructor : PromiseConstructor = Promise ,
49- private clientCapabilities : ClientCapabilities = { }
50- ) {
51- super ( schemaService , contributions , promiseConstructor ) ;
42+ constructor ( schemaService : YAMLSchemaService ) {
43+ super ( schemaService , [ ] , Promise ) ;
5244 this . schemaService = schemaService ;
53- this . promise = promiseConstructor || Promise ;
5445 this . customTags = [ ] ;
5546 this . completion = true ;
5647 }
@@ -227,7 +218,7 @@ export class YAMLCompletion extends JSONCompletion {
227218 this . getValueCompletions ( newSchema , currentDoc , node , offset , document , collector , types ) ;
228219 }
229220
230- return this . promise . all ( collectionPromises ) . then ( ( ) => {
221+ return Promise . all ( collectionPromises ) . then ( ( ) => {
231222 return result ;
232223 } ) ;
233224 } ) ;
0 commit comments