Files
DefinitelyTyped/types/browser-bunyan/index.d.ts
Michael Strobel d16dda4905 [browser-bunyan] Improve ConsoleFormattedStream, add ConsoleRawStream (#18620)
- extend bunyan in the export instead of augmenting it globally
- add tests from the project's README
2017-08-14 13:24:40 -07:00

32 lines
953 B
TypeScript

// Type definitions for browser-bunyan 0.4
// Project: https://github.com/philmander/browser-bunyan
// Definitions by: Paul Lockwood <https://github.com/PaulLockwood>
// Michael Strobel <https://github.com/kryops>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference types="node" />
import * as bunyan from 'bunyan';
declare namespace BrowserBunyan {
interface ConsoleFormattedStreamOptions {
logByLevel?: boolean;
}
interface ConsoleFormattedStream {
new(options?: ConsoleFormattedStreamOptions): NodeJS.WritableStream;
}
interface ConsoleRawStream {
new(options?: ConsoleFormattedStreamOptions): NodeJS.WritableStream;
}
}
type BrowserBunyan = typeof bunyan & {
ConsoleFormattedStream: BrowserBunyan.ConsoleFormattedStream
ConsoleRawStream: BrowserBunyan.ConsoleRawStream
};
declare const browserBunyan: BrowserBunyan;
export = browserBunyan;