From 9df6bcdea0274d516358a07d3bc85a9306e09443 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Thu, 27 Aug 2026 17:18:10 -0700 Subject: [PATCH] Type the empty-content test double against the real model The literal narrowed suppressedGitHubPR to number and typed the callback as Mock, so neither direction was comparable and tsconfig.tc.web.json failed on TS2352. Keeping the 'as' cast preserves checking of the fields the double does supply. --- .../checks-panel/panel-content-rendering.test.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx b/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx index 0695e7af96e..04d2a642d95 100644 --- a/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx +++ b/src/renderer/src/components/right-sidebar/checks-panel/panel-content-rendering.test.tsx @@ -38,14 +38,14 @@ describe('checks panel concrete content', () => { }) it('renders a durable unlinked state that can relink before PR data refetches', () => { - const handleLinkSuppressedPullRequest = vi.fn() + const handleLinkSuppressedPullRequest = vi.fn<() => void>() const model = { activeReview: null, activeWorktree: { id: 'worktree-1' }, isFolder: false, linkedReviewNumber: null, - suppressedGitHubPR: 42, - handleLinkSuppressedPullRequest + suppressedGitHubPR: 42 as number | null, + handleLinkSuppressedPullRequest: handleLinkSuppressedPullRequest as () => void } as ChecksPanelEmptyContentModel render()