Repository navigation
fix: remove unnecessary any type from catch clause in github.ts - #24504
alfredocristofano wants to merge 3 commits into
Conversation
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
|
The following comment was made by an LLM, it may be inaccurate: I found a potentially related PR: PR #24503: fix: replace catch (e: any) with proper unknown handling in mcp/index.ts This PR addresses the same style guide violation (removing unnecessary |
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
|
Closing this one myself. The branch picked up a large unrelated diff and now shows conflicts, so it is not useful for review in its current form. I’ll keep the issue open for a cleaner fix. |
Issue for this PR
Closes #24327
Type of change
What does this PR do?
Removes an unnecessary
anytype annotation from acatchclause insrc/cli/cmd/github.ts(line 689).The project style guide prohibits
any("Avoidany; prefer precise types"). The existing code already safely handles the caught value withinstanceofchecks (Process.RunFailedError,Error), so theanyannotation provides no value and disables type checking.How did you verify your code works?
e instanceof Errorande instanceof Process.RunFailedErrorbefore accessing Error-specific properties: anylets TypeScript inferunknown, which is the correct type for caught valuesChecklist