Skip to content

Commit 587b8c2

Browse files
committed
fix: biome errors
1 parent 08dd402 commit 587b8c2

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/core/errors/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ export class AppError extends Error {
3636
return correctField || e instanceof AppError;
3737
}
3838

39-
static getAppError(e: any): AppError {
39+
static getAppError(e: unknown): AppError {
4040
const wrappedError = AppError.getTypedError(e);
4141
if (AppError.isAppError(wrappedError)) return wrappedError;
4242
return new AppError({ code: "UNKNOWN_ERROR", originalError: wrappedError });
4343
}
4444

45-
private static getTypedError(value: any): TypedError {
45+
private static getTypedError(value: unknown): TypedError {
4646
if (typeof value === "object" && value !== null) {
4747
return value;
4848
}
@@ -56,7 +56,7 @@ export class AppError extends Error {
5656
...Object.getOwnPropertySymbols(err),
5757
];
5858

59-
const serializedObj = allProps.reduce<Record<string | symbol, any>>(
59+
const serializedObj = allProps.reduce<Record<string | symbol, unknown>>(
6060
(acc, key) => {
6161
if (!omit?.[key]) {
6262
const value = err[key as keyof TypedError];

src/core/utils/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { setTimeout } from "node:timers/promises";
22

33
export const json_stringify = (
4-
o: any,
4+
o: unknown,
55
space?: number,
66
allowDuplicates = false,
77
) => {
@@ -29,7 +29,9 @@ export const json_stringify = (
2929
return r;
3030
};
3131

32-
export type PartialRecord<K extends keyof any, T> = { [P in K]?: T };
32+
export type PartialRecord<K extends string | number | symbol, V> = Partial<
33+
Record<K, V>
34+
>;
3335

3436
export async function timeout(ms: number): Promise<never> {
3537
await setTimeout(ms);

0 commit comments

Comments
 (0)