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,5 +1,6 @@
import { afterAll, afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "bun:test";
import * as path from "node:path";
import type { Model } from "@oh-my-pi/pi-ai";
import { Agent } from "@oh-my-pi/pi-agent-core";
import { ModelRegistry } from "@oh-my-pi/pi-coding-agent/config/model-registry";
import { resetSettingsForTest, Settings } from "@oh-my-pi/pi-coding-agent/config/settings";
@@ -41,7 +42,7 @@ type GoalHarness = {
type SharedFixture = {
authStorage: AuthStorage;
modelRegistry: ModelRegistry;
model: NonNullable<ReturnType<ModelRegistry["find"]>>;
model: Model;
baseDir: TempDir;
};