UNPKG

consola

Version:

Elegant Console Logger for Node.js and Browser

56 lines (45 loc) 1.56 kB
declare interface ConsolaReporter { log: (logObj, { async, stdout, stderr }) => void } declare class Consola { // Built-in log levels static fatal (message: any): void; static error (message: any): void; static warn (message: any): void; static log (message: any): void; static info (message: any): void; static start (message: any): void; static success (message: any): void; static ready (message: any): void; static debug (message: any): void; static trace(message: any): void; // Create static create(options: any): (typeof Consola); static withDefaults(defaults: any): (typeof Consola); static withTag(tag: string): (typeof Consola); static withScope(tag: string): (typeof Consola); // Reporter static addReporter(reporter: ConsolaReporter): (typeof Consola); static setReporters(reporters: Array<ConsolaReporter>): (typeof Consola); static removeReporter(reporter: any): (typeof Consola); static remove(reporter: any): (typeof Consola); static clear(reporter: any): (typeof Consola); // Wrappers static wrapAll(): void; static restoreAll(): void; static wrapConsole(): void; static restoreConsole(): void; static wrapStd(): void; static restoreStd(): void; // Pause/Resume static pauseLogs(): void; static pause(): void; static resumeLogs(): void; static resume(): void; // Mock static mockTypes(mockFn: any); static mock(mockFn: any); } declare module "consola" { export default Consola; }