-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(types): allow passing extra arguments (#46)
- Loading branch information
Showing
1 changed file
with
48 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,55 @@ | ||
declare interface ConsolaReporter { | ||
log: (logObj: any, { async, stdout, stderr }: any) => void | ||
log: (logObj: any, { async, stdout, stderr }: any) => 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): any; | ||
static mock(mockFn: any): any; | ||
// Built-in log levels | ||
static fatal(message: any, ...args: any[]): void | ||
static error(message: any, ...args: any[]): void | ||
static warn(message: any, ...args: any[]): void | ||
static log(message: any, ...args: any[]): void | ||
static info(message: any, ...args: any[]): void | ||
static start(message: any, ...args: any[]): void | ||
static success(message: any, ...args: any[]): void | ||
static ready(message: any, ...args: any[]): void | ||
static debug(message: any, ...args: any[]): void | ||
static trace(message: any, ...args: 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): any | ||
static mock(mockFn: any): any | ||
} | ||
|
||
declare module "consola" { | ||
export default Consola; | ||
declare module 'consola' { | ||
export default Consola | ||
} |