mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 13:29:44 +00:00
parent
6c10fb4371
commit
65c6a0a543
|
@ -127,7 +127,6 @@ export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocume
|
|||
async doResolve(document: TextDocument, item: CompletionItem): Promise<CompletionItem> {
|
||||
const jsDocument = jsDocuments.get(document);
|
||||
const jsLanguageService = await host.getLanguageService(jsDocument);
|
||||
// @ts-expect-error until 4.3 protocol update
|
||||
let details = jsLanguageService.getCompletionEntryDetails(jsDocument.uri, item.data.offset, item.label, undefined, undefined, undefined, undefined);
|
||||
if (details) {
|
||||
item.detail = ts.displayPartsToString(details.displayParts);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"license": "MIT",
|
||||
"description": "Dependencies shared by all extensions",
|
||||
"dependencies": {
|
||||
"typescript": "4.2.4"
|
||||
"typescript": "^4.3.0-dev.20210503"
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "node ./postinstall"
|
||||
|
|
|
@ -79,7 +79,6 @@ class MyCompletionItem extends vscode.CompletionItem {
|
|||
this.sortText = tsEntry.sortText;
|
||||
}
|
||||
|
||||
// @ts-expect-error until 4.3 protocol update
|
||||
const { sourceDisplay, isSnippet } = tsEntry;
|
||||
if (sourceDisplay) {
|
||||
this.label2 = { name: tsEntry.name, qualifier: Previewer.plainWithLinks(sourceDisplay, client) };
|
||||
|
@ -184,11 +183,9 @@ class MyCompletionItem extends vscode.CompletionItem {
|
|||
const args: Proto.CompletionDetailsRequestArgs = {
|
||||
...typeConverters.Position.toFileLocationRequestArgs(filepath, this.position),
|
||||
entryNames: [
|
||||
// @ts-expect-error until TypeScript 4.3 protocol update
|
||||
this.tsEntry.source || this.tsEntry.data ? {
|
||||
name: this.tsEntry.name,
|
||||
source: this.tsEntry.source,
|
||||
// @ts-expect-error until TypeScript 4.3 protocol update
|
||||
data: this.tsEntry.data,
|
||||
} : this.tsEntry.name
|
||||
]
|
||||
|
@ -561,7 +558,6 @@ class CompletionAcceptedCommand implements Command {
|
|||
*/
|
||||
this.telemetryReporter.logTelemetry('completions.accept', {
|
||||
isPackageJsonImport: item.tsEntry.isPackageJsonImport ? 'true' : undefined,
|
||||
// @ts-expect-error until 4.3 protocol update
|
||||
isImportStatementCompletion: item.tsEntry.isImportStatementCompletion ? 'true' : undefined,
|
||||
});
|
||||
}
|
||||
|
@ -753,7 +749,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
|
|||
dotAccessorContext = { range, text };
|
||||
}
|
||||
}
|
||||
// @ts-expect-error until 4.3 protocol update
|
||||
isIncomplete = !!response.body.isIncomplete || (response as any).metadata && (response as any).metadata.isIncomplete;
|
||||
entries = response.body.entries;
|
||||
metadata = response.metadata;
|
||||
|
@ -792,7 +787,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
|
|||
};
|
||||
items.push(item);
|
||||
includesPackageJsonImport = includesPackageJsonImport || !!entry.isPackageJsonImport;
|
||||
// @ts-expect-error until 4.3 protocol update
|
||||
includesImportStatementCompletion = includesImportStatementCompletion || !!entry.isImportStatementCompletion;
|
||||
}
|
||||
}
|
||||
|
@ -842,7 +836,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
|
|||
return this.client.apiVersion.lt(API.v381) ? undefined : '#';
|
||||
|
||||
case ' ':
|
||||
// @ts-expect-error until 4.3.0 protocol update
|
||||
const space: Proto.CompletionsTriggerCharacter = ' ';
|
||||
return this.client.apiVersion.gte(API.v430) ? space : undefined;
|
||||
|
||||
|
|
|
@ -183,7 +183,6 @@ export default class FileConfigurationManager extends Disposable {
|
|||
includeAutomaticOptionalChainCompletions: config.get<boolean>('suggest.includeAutomaticOptionalChainCompletions', true),
|
||||
provideRefactorNotApplicableReason: true,
|
||||
generateReturnInDocTemplate: config.get<boolean>('suggest.jsdoc.generateReturns', true),
|
||||
// @ts-expect-error until 4.3 protocol update
|
||||
includeCompletionsForImportStatements: config.get<boolean>('suggest.includeCompletionsForImportStatements', true),
|
||||
includeCompletionsWithSnippetText: config.get<boolean>('suggest.includeCompletionsWithSnippetText', true),
|
||||
displayPartsForJSDoc: true,
|
||||
|
|
|
@ -24,10 +24,10 @@ fast-plist@0.1.2:
|
|||
resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8"
|
||||
integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg=
|
||||
|
||||
typescript@4.2.4:
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.4.tgz#8610b59747de028fda898a8aef0e103f156d0961"
|
||||
integrity sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==
|
||||
typescript@^4.3.0-dev.20210503:
|
||||
version "4.3.0-dev.20210503"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.0-dev.20210503.tgz#0a3eb480676effd4975beb5a2f097530ed53550a"
|
||||
integrity sha512-Gj3TQve5PLCZoPBy96Yp6Y3+jNLmms0i3ynhxEJAKgax7Fxui29/uG/DClbBtKz1peNhzXwikXVFFAV1BB/3mw==
|
||||
|
||||
vscode-grammar-updater@^1.0.3:
|
||||
version "1.0.3"
|
||||
|
|
Loading…
Reference in a new issue