Skip to content

Commit

Permalink
Fix any usage partly
Browse files Browse the repository at this point in the history
The query results should be type checked properly in the future.
  • Loading branch information
peace-maker committed Apr 29, 2024
1 parent 61ccfdd commit 022992c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions api/src/discord/database/tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion api/src/plugins/savepointWrapper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Client } from "pg";

async function savepointWrapper(pgClient: Client, f: () => any): Promise<any> {
async function savepointWrapper<Type>(pgClient: Client, f: () => Type): Promise<Type> {
const name = `"CHECKPOINT-${Math.floor(Math.random() * 0xffff)}"`;
await pgClient.query(`SAVEPOINT ${name}`);
try {
Expand Down

0 comments on commit 022992c

Please sign in to comment.