diff --git a/index.d.ts b/index.d.ts index 71c3f80..2f739d9 100644 --- a/index.d.ts +++ b/index.d.ts @@ -17,7 +17,7 @@ declare namespace Logger { export interface Record { id: number - meta: any + meta: Logger.Meta name: string type: Logger.Type level: number @@ -25,6 +25,8 @@ declare namespace Logger { timestamp: number } + export interface Meta {} + export interface Target { /** * - 0: no color support diff --git a/src/shared.ts b/src/shared.ts index 921b281..0d42dff 100644 --- a/src/shared.ts +++ b/src/shared.ts @@ -140,7 +140,7 @@ class Logger { } extend = (namespace: string) => { - return new Logger(`${this.name}:${namespace}`) + return new Logger(`${this.name}:${namespace}`, this.meta) } warning = (format: any, ...args: any[]) => {