Skip to content

Commit

Permalink
fix: Export built-in streams in main typings. Fixes #48
Browse files Browse the repository at this point in the history
Now the following will compile:

```ts
import {
    ConsoleRawStream,
    ConsoleFormattedStream,
    ConsolePlainStream,
} from 'browser-bunyan';
```
  • Loading branch information
Philip Mander authored and philmander committed Oct 13, 2020
1 parent 15b9436 commit 59c9d67
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
13 changes: 9 additions & 4 deletions examples/typescript/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import { createLogger, INFO, DEBUG, WARN, stdSerializers, resolveLevel } from 'browser-bunyan';
import { ConsoleFormattedStream } from '@browser-bunyan/console-formatted-stream';
import { ConsolePlainStream } from '@browser-bunyan/console-plain-stream';
import { ConsoleRawStream } from '@browser-bunyan/console-raw-stream';
import {
createLogger,
INFO, DEBUG, WARN,
stdSerializers,
resolveLevel,
ConsoleRawStream,
ConsoleFormattedStream,
ConsolePlainStream,
} from 'browser-bunyan';

const log = createLogger({
name: 'myLogger',
Expand Down
7 changes: 6 additions & 1 deletion packages/browser-bunyan/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,9 @@ export type StdSerializers = {

export * from '@browser-bunyan/levels';
export function createLogger(opts: LoggerOptions): Logger;
export const stdSerializers: StdSerializers;
export const stdSerializers: StdSerializers;
export function safeCycles(): any;

export * from '@browser-bunyan/console-plain-stream';
export * from '@browser-bunyan/console-raw-stream';
export * from '@browser-bunyan/console-formatted-stream';

0 comments on commit 59c9d67

Please sign in to comment.