[json] "Fetch Online Package Info" feature doesn't work when npm is not present. Fixes #77066

This commit is contained in:
Martin Aeschlimann
2019-09-30 16:59:34 +02:00
parent 2de9a3629f
commit bae6f5f1a5
2 changed files with 84 additions and 56 deletions

View File

@@ -25,7 +25,7 @@ export interface IJSONContribution {
getDocumentSelector(): DocumentSelector;
getInfoContribution(fileName: string, location: Location): Thenable<MarkedString[] | null> | null;
collectPropertySuggestions(fileName: string, location: Location, currentWord: string, addValue: boolean, isLast: boolean, result: ISuggestionsCollector): Thenable<any> | null;
collectValueSuggestions(fileName: string, location: Location, result: ISuggestionsCollector): Thenable<any> | null;
collectValueSuggestions(fileName: string, location: Location, result: ISuggestionsCollector): Thenable<any>;
collectDefaultSuggestions(fileName: string, result: ISuggestionsCollector): Thenable<any>;
resolveSuggestion?(item: CompletionItem): Thenable<CompletionItem | null> | null;
}
@@ -164,4 +164,4 @@ export class JSONCompletionItemProvider implements CompletionItemProvider {
}
}
export const xhrDisabled = () => Promise.reject({ responseText: 'Use of online resources is disabled.' });
export const xhrDisabled = () => Promise.reject({ responseText: 'Use of online resources is disabled.' });