UNPKG

1.13 kBTypeScriptView Raw
1import * as ts from 'typescript';
2export declare enum LogLevel {
3 Verbose = 0,
4 Info = 1,
5 Warn = 2,
6 Error = 3,
7 Success = 4
8}
9export declare class Logger {
10 errorCount: number;
11 warningCount: number;
12 hasErrors(): boolean;
13 hasWarnings(): boolean;
14 resetErrors(): void;
15 resetWarnings(): void;
16 write(text: string, ...args: string[]): void;
17 writeln(text: string, ...args: string[]): void;
18 success(text: string, ...args: string[]): void;
19 verbose(text: string, ...args: string[]): void;
20 warn(text: string, ...args: string[]): void;
21 error(text: string, ...args: string[]): void;
22 log(message: string, level?: LogLevel, newLine?: boolean): void;
23 diagnostics(diagnostics: ReadonlyArray<ts.Diagnostic>): void;
24 diagnostic(diagnostic: ts.Diagnostic): void;
25}
26export declare class ConsoleLogger extends Logger {
27 log(message: string, level?: LogLevel, newLine?: boolean): void;
28}
29export declare class CallbackLogger extends Logger {
30 callback: Function;
31 constructor(callback: Function);
32 log(message: string, level?: LogLevel, newLine?: boolean): void;
33}