From 022992c0c9448a259b6bea4baeab014e7650809c Mon Sep 17 00:00:00 2001 From: Peace-Maker Date: Mon, 29 Apr 2024 14:47:09 +0200 Subject: [PATCH] Fix `any` usage partly The query results should be type checked properly in the future. --- api/src/discord/database/tasks.ts | 1 + api/src/plugins/savepointWrapper.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/src/discord/database/tasks.ts b/api/src/discord/database/tasks.ts index 03c7997ae..fb03ee168 100644 --- a/api/src/discord/database/tasks.ts +++ b/api/src/discord/database/tasks.ts @@ -10,6 +10,7 @@ export interface Task { flag: string; } +// eslint-disable-next-line @typescript-eslint/no-explicit-any function buildTask(row: any): Task { return { id: row.id as bigint, diff --git a/api/src/plugins/savepointWrapper.ts b/api/src/plugins/savepointWrapper.ts index 518d914c3..5767e0977 100644 --- a/api/src/plugins/savepointWrapper.ts +++ b/api/src/plugins/savepointWrapper.ts @@ -1,6 +1,6 @@ import { Client } from "pg"; -async function savepointWrapper(pgClient: Client, f: () => any): Promise { +async function savepointWrapper(pgClient: Client, f: () => Type): Promise { const name = `"CHECKPOINT-${Math.floor(Math.random() * 0xffff)}"`; await pgClient.query(`SAVEPOINT ${name}`); try {