Skip to content

Commit 4d04905

Browse files
test(readFileTool): fix check-types TS2352 on console.warn restore cast
Cast through `unknown` before `ReturnType<typeof vi.spyOn>` so tsc accepts the conversion (console.warn's signature doesn't overlap with MockInstance). Unblocks the `compile` CI job.
1 parent 5a5605d commit 4d04905

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/core/tools/__tests__/readFileTool.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ describe("ReadFileTool", () => {
200200
// doesn't leak into subsequent tests. Scoped to console to avoid restoring
201201
// the module-level mocks (e.g. ImageMemoryTracker) set up for the suite.
202202
if (vi.isMockFunction(console.warn)) {
203-
;(console.warn as ReturnType<typeof vi.spyOn>).mockRestore()
203+
;(console.warn as unknown as ReturnType<typeof vi.spyOn>).mockRestore()
204204
}
205205
})
206206

0 commit comments

Comments
 (0)