refactor: replaced ReturnType<typeof setTimeout> with Timer type

- Replaced usage of `ReturnType<typeof setTimeout>` and `ReturnType<typeof setInterval>` with the explicit `Timer` type across the codebase.
- Updated several type definitions and function signatures to use concrete types instead of inferred return types for improved clarity and maintainability.
This commit is contained in:
can1357
2026-06-19 17:38:07 +02:00
parent 81d9e17881
commit 9478e3cc5c
19 changed files with 38 additions and 30 deletions
@@ -1,4 +1,4 @@
import { afterEach, beforeAll, describe, expect, it, vi } from "bun:test";
import { afterEach, beforeAll, describe, expect, it, type Mock, vi } from "bun:test";
import { KeybindingsManager } from "@oh-my-pi/pi-coding-agent/config/keybindings";
import { HookEditorComponent } from "@oh-my-pi/pi-coding-agent/modes/components/hook-editor";
import { ExtensionUiController } from "@oh-my-pi/pi-coding-agent/modes/controllers/extension-ui-controller";
@@ -67,8 +67,8 @@ function createControllerContext() {
stop: vi.fn(),
terminal: { columns: 120 },
} as unknown as TestContext["ui"] & {
setFocus: ReturnType<typeof vi.fn>;
requestRender: ReturnType<typeof vi.fn>;
setFocus: Mock;
requestRender: Mock;
};
const ctx = {
editor,