diff --git a/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts b/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts index 1261bfd82..0d837a0c2 100644 --- a/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts +++ b/packages/language-server/src/plugins/typescript/features/CodeActionsProvider.ts @@ -321,7 +321,8 @@ export class CodeActionsProviderImpl implements CodeActionsProvider { .filter( (refactor) => refactor.command?.command.includes('function_scope') || - refactor.command?.command.includes('constant_scope') + refactor.command?.command.includes('constant_scope') || + refactor.command?.command === 'Infer function return type' ) // The language server also proposes extraction into const/function in module scope, // which is outside of the render function, which is svelte2tsx-specific and unmapped, diff --git a/packages/language-server/src/server.ts b/packages/language-server/src/server.ts index 6933dc9c8..87c750285 100644 --- a/packages/language-server/src/server.ts +++ b/packages/language-server/src/server.ts @@ -206,7 +206,8 @@ export function startServer(options?: LSOptions) { 'constant_scope_1', 'constant_scope_2', 'constant_scope_3', - 'extract_to_svelte_component' + 'extract_to_svelte_component', + 'Infer function return type' ] } : undefined,