0.2.9 • Published 2 years ago

@types/bunyan-format v0.2.9

Weekly downloads
6,225
License
MIT
Repository
github
Last release
2 years ago

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

// Type definitions for bunyan-format 0.2
// Project: https://github.com/thlorenz/bunyan-format
// Definitions by: Piotr Roszatycki <https://github.com/dex4er>
//                 Ashley Abbott <https://github.com/ashpabb>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.1

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

import { Writable } from 'stream';

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

    interface Options {
        outputMode?: 'short' | 'long' | 'simple' | 'json' | 'bunyan' | 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 {
    // tslint:disable-next-line 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: Thu, 08 Jul 2021 00:35:45 GMT
  • Dependencies: @types/node
  • Global values: none

Credits

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