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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user