fix: Fixes eslint issues.

This commit is contained in:
greysoh 2024-06-02 11:31:09 -04:00
parent 436811a0e3
commit 3806ce92cb
Signed by: imterah
GPG key ID: 8FA7DD57BA6CEA37
3 changed files with 25 additions and 7 deletions

View file

@ -18,10 +18,13 @@ export async function backendInit(
backends: Record<number, BackendBaseClass>,
prisma: PrismaClient,
logger?: (arg: string) => void,
errorOut?: (arg: string) => void
errorOut?: (arg: string) => void,
): Promise<boolean> {
const log = (...args: any[]) => logger ? logger(format(...args)) : console.log(...args);
const error = (...args: any[]) => errorOut ? errorOut(format(...args)) : log(...args);
const log = (...args: string[]) =>
logger ? logger(format(...args)) : console.log(...args);
const error = (...args: string[]) =>
errorOut ? errorOut(format(...args)) : log(...args);
const ourProvider = backendProviders[backend.backend];