diff --git a/index.d.ts b/index.d.ts index f11c6e9..30fdd6f 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,80 +1,37 @@ -/** Declaration file generated by dts-gen */ +declare function logdown(prefix: string, opts?: logdown.LogdownOptions): logdown.Logger; -export = logdown; +declare namespace logdown { + type LoggerState = { isEnabled: boolean }; + type TransportFunction = (options: TransportOptions) => void; -declare class logdown { - constructor(prefix: any, opts: any); + interface LogdownOptions { + logger?: any; + markdown?: boolean; + prefix?: string; + prefixColor?: string; + } - debug(...args: any[]): void; + interface TransportOptions { + args: any[]; + instance: string; + level: string; + msg: string; + state: LoggerState; + } - error(...args: any[]): void; + const transports: TransportFunction[]; - info(...args: any[]): void; + class Logger { + constructor(prefix: string, opts?: LogdownOptions); + debug(...args: any[]): void; + error(...args: any[]): void; + info(...args: any[]): void; log(...args: any[]): void; - warn(...args: any[]): void; - static disable(...args: any[]): void; - - static enable(...args: any[]): void; - + state: LoggerState; + } } -declare namespace logdown { - namespace disable { - const prototype: { - }; - - } - - namespace enable { - const prototype: { - }; - - } - - namespace prototype { - function debug(...args: any[]): void; - - function error(...args: any[]): void; - - function info(...args: any[]): void; - - function log(...args: any[]): void; - - function warn(...args: any[]): void; - - namespace debug { - const prototype: { - }; - - } - - namespace error { - const prototype: { - }; - - } - - namespace info { - const prototype: { - }; - - } - - namespace log { - const prototype: { - }; - - } - - namespace warn { - const prototype: { - }; - - } - - } - -} +export = logdown;