Pick up TS 4.7 for bundling with VS Code

This commit is contained in:
Matt Bierner
2022-05-02 15:50:09 -07:00
parent e3e4bfacc3
commit 17ee4c4265
5 changed files with 21 additions and 10 deletions

View File

@@ -59,8 +59,7 @@ class MyCompletionItem extends vscode.CompletionItem {
constructor(
public readonly position: vscode.Position,
public readonly document: vscode.TextDocument,
// Intersection needed to avoid type error until TS 4.7.
public readonly tsEntry: Proto.CompletionEntry & { labelDetails?: { detail?: string; description?: string } },
public readonly tsEntry: Proto.CompletionEntry,
private readonly completionContext: CompletionContext,
public readonly metadata: any | undefined,
client: ITypeScriptServiceClient,
@@ -831,7 +830,6 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider<
this.telemetryReporter.logTelemetry('completions.execute', {
duration: String(duration),
type: response?.type ?? 'unknown',
// @ts-expect-error until 4.7
flags: response?.type === 'response' && typeof response.body?.flags === 'number' ? String(response.body.flags) : undefined,
count: String(response?.type === 'response' && response.body ? response.body.entries.length : 0),
updateGraphDurationMs: response?.type === 'response' && typeof response.performanceData?.updateGraphDurationMs === 'number'

View File

@@ -187,7 +187,6 @@ export default class FileConfigurationManager extends Disposable {
includeCompletionsForImportStatements: config.get<boolean>('suggest.includeCompletionsForImportStatements', true),
includeCompletionsWithSnippetText: config.get<boolean>('suggest.includeCompletionsWithSnippetText', true),
includeCompletionsWithClassMemberSnippets: config.get<boolean>('suggest.classMemberSnippets.enabled', true),
// @ts-expect-error until 4.7
includeCompletionsWithObjectLiteralMethodSnippets: config.get<boolean>('suggest.objectLiteralMethodSnippets.enabled', true),
useLabelDetailsInCompletionEntries: true,
allowIncompleteCompletions: true,