diff --git a/src/types.ts b/src/types.ts index 774cfb1..0b4f3a7 100644 --- a/src/types.ts +++ b/src/types.ts @@ -25,19 +25,8 @@ export type WriterOptions = { [key: string | number | symbol]: any, } -export abstract class Writer { - protected readonly _options: WriterOptions = { - minLevel: Level.INFO, - with_color: false, - } - - public log(level: Level, ...data: any[]) : void { - if (level < this.options.minLevel) return - this.write(level, ...data) - } - protected abstract write(level: Level, ...data: any[]) : void; - - public get options() : WriterOptions { - return this._options - } +export interface Writer { + log(level: Level, ...data: any[]) : void; + get options() : WriterOptions; + readonly _options: WriterOptions; }