Tests: remove redundant type assertions

This commit is contained in:
mukhtharcm
2026-03-29 16:50:42 +00:00
parent 59f528d30b
commit 818d437a54
2 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ vi.mock("../config/config.js", async (importOriginal) => {
vi.mock(
buildBundledPluginModuleId("telegram", "update-offset-runtime-api.js"),
async (importOriginal) => {
const actual = (await importOriginal()) as Record<string, unknown>;
const actual: Record<string, unknown> = await importOriginal();
return {
...actual,
deleteTelegramUpdateOffset: offsetMocks.deleteTelegramUpdateOffset,

View File

@@ -227,12 +227,12 @@ function copyFileIfExists(sourcePath: string, targetPath: string): void {
function sanitizeLiveConfig(raw: string): string {
try {
const parsed = JSON5.parse(raw) as {
const parsed: {
agents?: {
defaults?: Record<string, unknown>;
list?: Array<Record<string, unknown>>;
};
};
} = JSON5.parse(raw);
if (!parsed || typeof parsed !== "object") {
return raw;
}