Merged
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @joaomorenoMatched files:
@benibenjMatched files:
@bpaseroMatched files:
@TylerLeonhardtMatched files:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR continues the #269213 effort to reduce unsafe/fragile ...args: any[] usage (and related any patterns), primarily by tightening rest-parameter types to unknown[] or to existing parameter types.
Changes:
- Replaces many
...args: any[]rest parameters withunknown[]across core IPC/event/util code paths and tests. - Uses type utilities like
Parameters<...>to keep overrides aligned with base method signatures. - Refines a few internal API/protocol DTO shapes from
any[]tounknown[].
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/test/browser/window.test.ts | Test helper rest args tightened to unknown[]. |
| src/vs/workbench/test/browser/parts/editor/breadcrumbModel.test.ts | Uses Parameters<TestConfigurationService['getValue']> instead of any[]. |
| src/vs/workbench/services/userAttention/test/browser/userAttentionService.test.ts | Sinon stub rest args tightened to unknown[]. |
| src/vs/workbench/services/authentication/test/browser/authenticationQueryServiceMocks.ts | Test call tracking rest args tightened to unknown[]. |
| src/vs/workbench/api/worker/extHostConsoleForwarder.ts | Console forwarder callback rest args tightened to unknown[]. |
| src/vs/workbench/api/test/browser/extHostDocumentSaveParticipant.test.ts | Test log override rest args tightened to unknown[]. |
| src/vs/workbench/api/node/extensionHostProcess.ts | Patched process.on listener rest args tightened to unknown[]. |
| src/vs/workbench/api/node/extHostConsoleForwarder.ts | Console forwarder callback rest args tightened to unknown[]. |
| src/vs/workbench/api/node/extHostCLIServer.ts | CLI command executor args changed to unknown[]. |
| src/vs/workbench/api/common/extHostCommands.ts | Converted-command plumbing now uses unknown[] rest args. |
| src/vs/workbench/api/common/extHost.protocol.ts | Protocol shape uses unknown[] for contributed command args; DTO uses unknown[]. |
| src/vs/workbench/api/common/extHost.api.impl.ts | Commands API implementation rest args/thisArg tightened to unknown. |
| src/vs/platform/instantiation/common/extensions.ts | SyncDescriptor ctor cast uses unknown[] rest args. |
| src/vs/base/parts/ipc/electron-main/ipcMain.ts | IPC listener wrapper rest args tightened to unknown[]. |
| src/vs/base/parts/ipc/common/ipc.ts | ProxyChannel generated function uses unknown[] rest args. |
| src/vs/base/common/observableInternal/logging/debugger/rpc.ts | Typed RPC proxy methods now use unknown[] rest args. |
| src/vs/base/common/lifecycle.ts | Reference collection acquire args tightened to unknown[]. |
| src/vs/base/common/event.ts | DOM/Node event adapter wrapper rest args tightened to unknown[]. |
| src/vs/base/common/decorators.ts | Memoize wrapper rest args tightened to unknown[]; removes as any access. |
| src/vs/base/common/async.ts | Attempts to improve scheduler typing; introduces a generic runner. |
| src/vs/base/browser/ui/list/listView.ts | Native DnD data arrays changed from any[] to unknown[]. |
| src/typings/base-common.d.ts | Global setInterval signature tightened to unknown[]. |
jrieken
previously approved these changes
Mar 10, 2026
lszomoru
approved these changes
Mar 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We should always default to using
any[]for arguments that we forward along. This can catch errors where you accidentally use an argument without type checkingFor #269213