Skip to content

Update caller side of CommandService to use unknown instead of any for args#270084

Merged
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/growing-catshark
Oct 6, 2025
Merged

Update caller side of CommandService to use unknown instead of any for args#270084
mjbvz merged 1 commit intomicrosoft:mainfrom
mjbvz:dev/mjbvz/growing-catshark

Conversation

@mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Oct 6, 2025

Part of #269213

Updates the command service to use unknown for args internally. Does not yet update ICommandHandler as this will require many more changes

Typing only change. Shouldn't have any runtime impact

…y` for args

Part of microsoft#269213

Updates the command service to use `unknown` for args. Does not yet update `ICommandHandler` as this will require many more changes
@mjbvz mjbvz self-assigned this Oct 6, 2025
Copilot AI review requested due to automatic review settings October 6, 2025 18:41
@mjbvz mjbvz enabled auto-merge October 6, 2025 18:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the command service and related components to use unknown instead of any for command arguments, improving type safety without affecting runtime behavior. This change is part of a larger effort to reduce the use of any types throughout the codebase.

Key Changes

  • Updated command argument types from any[] to unknown[] in the command service interface and implementations
  • Modified command handlers and test mocks to use the new typing
  • Updated protocol definitions for extension host communication

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/vs/workbench/services/commands/common/commandService.ts Updated main command service implementation to use unknown[] for arguments
src/vs/workbench/contrib/scm/browser/scmViewPane.ts Updated SCM action button command execution to use unknown[]
src/vs/workbench/contrib/notebook/test/browser/notebookExecutionService.test.ts Updated test mock command service to use unknown[]
src/vs/workbench/api/common/extHostCommands.ts Updated extension host command execution methods to use unknown[]
src/vs/workbench/api/common/extHost.protocol.ts Updated protocol interface for command execution to use unknown[]
src/vs/workbench/api/browser/mainThreadCommands.ts Updated main thread command execution to use unknown[]
src/vs/platform/keybinding/test/common/abstractKeybindingService.test.ts Updated keybinding service tests to use unknown[]
src/vs/platform/commands/common/commands.ts Updated core command interface and event definitions to use unknown[]
src/vs/editor/test/browser/services/openerService.test.ts Updated opener service test mock to use unknown[]
src/vs/editor/test/browser/editorTestServices.ts Updated test command service to use unknown[]
src/vs/editor/standalone/browser/standaloneServices.ts Updated standalone command service to use unknown[]

@vs-code-engineering vs-code-engineering bot added this to the October 2025 milestone Oct 6, 2025
@mjbvz mjbvz merged commit 3549553 into microsoft:main Oct 6, 2025
17 checks passed
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Nov 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants