Skip to content

Conversation

@Tyriar
Copy link
Member

@Tyriar Tyriar commented Nov 8, 2025

@Tyriar Tyriar added this to the November 2025 milestone Nov 8, 2025
@Tyriar Tyriar self-assigned this Nov 8, 2025
Copilot AI review requested due to automatic review settings November 8, 2025 13:49
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 improves type safety across the terminal codebase by replacing uses of the any type with more specific types (unknown or proper generic type parameters). The main change adds a default type parameter to the IProcessProperty interface, allowing it to be used without explicit generic arguments while maintaining type safety through indexed access types.

  • Updated IProcessProperty<T> interface to have a default type parameter (T extends ProcessPropertyType = ProcessPropertyType)
  • Replaced any with unknown in function parameters and return types across multiple terminal-related files
  • Added type assertions where needed to maintain type safety after removing explicit generic parameters
  • Removed multiple files from the eslint @typescript-eslint/no-explicit-any ignore list

Reviewed Changes

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

Show a summary per file
File Description
src/vs/platform/terminal/common/terminal.ts Added default type parameter to IProcessProperty interface, enabling usage without explicit generics
src/vs/workbench/services/terminal/common/embedderTerminalService.ts Removed <any> from IProcessProperty usage and changed updateProperty parameter from any to unknown
src/vs/workbench/contrib/terminal/browser/terminalProcessManager.ts Added type assertion when accessing value from property change events
src/vs/workbench/api/common/extHostTerminalService.ts Replaced any with unknown in function types, removed type casting in deserialize function, updated forEach callback signature, and removed unnecessary eslint-disable comment for variable property deletion
src/vs/workbench/api/browser/mainThreadTerminalService.ts Removed <any> from IProcessProperty usage and added type assertion for title property
src/vs/platform/terminal/node/windowsShellHelper.ts Replaced any parameter with proper WindowsProcessTreeType.IProcessTreeNode | undefined type
src/vs/platform/terminal/node/terminalProcess.ts Removed <any> from IProcessProperty usage and updated TODO comment with GitHub PR reference
src/vs/platform/terminal/node/ptyService.ts Replaced any with proper types in traceRpc decorator function and PersistentTerminalProcess class
src/vs/platform/terminal/node/ptyHostService.ts Removed <any> from IProcessProperty usage in event emitter
eslint.config.js Removed 13 terminal-related files from the @typescript-eslint/no-explicit-any ignore list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants