mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-03 23:50:25 +00:00
Tests: remove redundant type assertions
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user