@types/bunyan-format
TypeScript icon, indicating that this package has built-in type declarations

0.2.9 • Public • Published

Installation

npm install --save @types/bunyan-format

Summary

This package contains type definitions for bunyan-format (https://github.com/thlorenz/bunyan-format).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/bunyan-format.

index.d.ts

/// <reference types="node" />

import { Writable } from "stream";

declare namespace BunyanFormatWritable {
    interface ColorFromLevel {
        [level: number]: string;
    }

    interface Options {
        outputMode?: "short" | "long" | "simple" | "json" | "bunyan" | "inspect" | undefined;
        color?: boolean | undefined;
        colorFromLevel?: ColorFromLevel | undefined;
        levelInString?: boolean | undefined;
        jsonIndent?: string | number | undefined;
    }
}

/** Creates a writable stream that formats bunyan records written to it. */
interface BunyanFormatWritable extends Writable {
    // eslint-disable-next-line @typescript-eslint/no-misused-new
    new(options: BunyanFormatWritable.Options, output?: Writable): BunyanFormatWritable;
    (options: BunyanFormatWritable.Options, output?: Writable): BunyanFormatWritable;
}

declare const BunyanFormat: BunyanFormatWritable;

export = BunyanFormat;

Additional Details

  • Last updated: Mon, 20 Nov 2023 23:36:23 GMT
  • Dependencies: @types/node

Credits

These definitions were written by Piotr Roszatycki, and Ashley Abbott.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/bunyan-format

Weekly Downloads

10,850

Version

0.2.9

License

MIT

Unpacked Size

4.72 kB

Total Files

5

Last publish

Collaborators

  • types