import Loggers from '@/utils/logger';
|
|
// 声明全局变量来扩展 window 对象
|
declare global {
|
interface Window {
|
Logger: typeof Loggers;
|
}
|
class Logger extends Loggers {}
|
|
// let Logger: typeof Loggers;
|
// type Level = 'LOG' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR' | 'FATAL';
|
// class Logger {
|
// private static level: Level;
|
//
|
// static setLevel(newLevel: Level): void;
|
//
|
// static shouldLog(level: Level): boolean;
|
//
|
// static log(message: string | object): void;
|
//
|
// static debug(message: string | object): void;
|
//
|
// static info(message: string | object): void;
|
//
|
// static warn(message: string | object): void;
|
//
|
// static error(message: string | object, error?: Error): void;
|
//
|
// static fatal(message: string | object, error?: Error): void;
|
// }
|
}
|
|
// 让 TypeScript 知道这个文件是一个模块
|
// export {}
|