refactor: split hooks types and utils by domain
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
export type LogLevel = "debug" | "info" | "warn" | "error";
|
||||
|
||||
type LogValue =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| null
|
||||
| undefined
|
||||
| Error
|
||||
| DOMException
|
||||
| { [key: string]: LogValue }
|
||||
| LogValue[];
|
||||
|
||||
export type LogContext = Readonly<Record<string, LogValue>>;
|
||||
|
||||
export interface LogEntry {
|
||||
timestamp: string;
|
||||
level: LogLevel;
|
||||
scope: string;
|
||||
message: string;
|
||||
context?: LogContext;
|
||||
}
|
||||
|
||||
export interface LoggerConfig {
|
||||
minLevel: LogLevel;
|
||||
}
|
||||
Reference in New Issue
Block a user