Skip to content

fix: add explicit types to implicit any params in server spec#78

Merged
nicknisi merged 1 commit intomainfrom
fix/spec-implicit-any-types
May 4, 2026
Merged

fix: add explicit types to implicit any params in server spec#78
nicknisi merged 1 commit intomainfrom
fix/spec-implicit-any-types

Conversation

@nicknisi
Copy link
Copy Markdown
Member

@nicknisi nicknisi commented May 4, 2026

Summary

  • Adds unknown[] type annotations to 6 args parameters in consoleErrorSpy.mock.calls.filter() callbacks
  • Fixes noImplicitAny errors from pnpm typecheck

Test plan

  • pnpm typecheck passes

Open in Devin Review

The `consoleErrorSpy.mock.calls.filter()` callbacks lacked type
annotations on the `args` parameter, failing `noImplicitAny`.
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 4, 2026

Greptile Summary

This PR adds explicit unknown[] type annotations to 6 args parameters in consoleErrorSpy.mock.calls.filter() callbacks inside src/server/server.spec.ts, resolving noImplicitAny TypeScript errors surfaced by pnpm typecheck. The use of unknown[] is appropriate and slightly safer than any[] as it enforces proper type narrowing through the existing typeof args[0] === 'string' guards before calling .includes().

Confidence Score: 5/5

Safe to merge — minimal, mechanical TypeScript annotation fix in a test file with no logic changes.

All 6 changes are identical: adding unknown[] type annotations to filter callback parameters. No runtime behaviour is altered, and the type choice is correct given the existing narrowing guards.

No files require special attention.

Important Files Changed

Filename Overview
src/server/server.spec.ts Adds explicit unknown[] type annotations to 6 args parameters in consoleErrorSpy.mock.calls.filter() callbacks to resolve noImplicitAny TypeScript errors. No logic changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["consoleErrorSpy.mock.calls\n(MockInstance call log)"] --> B["filter((args: unknown[]) => ...)"]
    B --> C{"typeof args[0] === 'string'?"}
    C -- Yes --> D{"args[0].includes(message)?"}
    C -- No --> E["Exclude call"]
    D -- Yes --> F["Include call in filtered results"]
    D -- No --> E
Loading

Reviews (1): Last reviewed commit: "fix: add explicit types to implicit `any..." | Re-trigger Greptile

@nicknisi nicknisi merged commit 92526e8 into main May 4, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants