🤖 Pick PR #60488 (Stub out copilotRelated command) into release-5.7 by typescript-bot · Pull Request #60495 · microsoft/TypeScript

Expand Up @@ -2,7 +2,6 @@ import { __String, ApplicableRefactorInfo, ApplyCodeActionCommandResult, arrayFrom, AssignmentDeclarationKind, BaseType, BinaryExpression, Expand Down Expand Up @@ -234,7 +233,6 @@ import { Node, NodeArray, NodeFlags, nodeIsSynthesized, noop, normalizePath, normalizeSpans, Expand Down Expand Up @@ -1604,7 +1602,6 @@ const invalidOperationsInPartialSemanticMode: readonly (keyof LanguageService)[] "provideInlayHints", "getSupportedCodeFixes", "getPasteEdits", "getImports", ];
const invalidOperationsInSyntacticMode: readonly (keyof LanguageService)[] = [ Expand Down Expand Up @@ -3367,18 +3364,6 @@ export function createLanguageService( ); }
function getImports(fileName: string): readonly string[] { synchronizeHostData(); const file = getValidSourceFile(fileName); let imports: Set<string> | undefined; for (const specifier of file.imports) { if (nodeIsSynthesized(specifier)) continue; const name = program.getResolvedModuleFromModuleSpecifier(specifier, file)?.resolvedModule?.resolvedFileName; if (name) (imports ??= new Set()).add(name); } return imports ? arrayFrom(imports) : emptyArray; }
const ls: LanguageService = { dispose, cleanupSemanticCache, Expand Down Expand Up @@ -3453,7 +3438,6 @@ export function createLanguageService( preparePasteEditsForFile, getPasteEdits, mapCode, getImports, };
switch (languageServiceMode) { Expand Down