Fix: Enable TypeScript strict mode

This commit is contained in:
gpt-engineer-app[bot]
2025-10-20 00:26:49 +00:00
parent 84188b94f2
commit d9a912f443
11 changed files with 174 additions and 29 deletions

View File

@@ -7,24 +7,22 @@
const isDev = import.meta.env.DEV;
type LogContext = {
[key: string]: any;
};
type LogContext = Record<string, unknown>;
export const logger = {
log: (...args: any[]) => {
log: (...args: unknown[]): void => {
if (isDev) console.log(...args);
},
error: (message: string, context?: LogContext) => {
error: (message: string, context?: LogContext): void => {
console.error(message, context); // Always log errors
},
warn: (...args: any[]) => {
warn: (...args: unknown[]): void => {
if (isDev) console.warn(...args);
},
info: (...args: any[]) => {
info: (...args: unknown[]): void => {
if (isDev) console.info(...args);
},
debug: (...args: any[]) => {
debug: (...args: unknown[]): void => {
if (isDev) console.debug(...args);
}
};