mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
bunyan-format: reverted back to old syntax (#40455)
* bunyan-format: reverted back to old syntax * bunyan-format: tslint:disable-next-line
This commit is contained in:
parent
4962164b76
commit
5cc9d512c6
@ -1,9 +1,10 @@
|
||||
import BunyanFormatWritable = require('bunyan-format');
|
||||
import { Writable } from 'stream';
|
||||
|
||||
const formatOut = new BunyanFormatWritable({ outputMode: 'short' });
|
||||
const formatOut: Writable = new BunyanFormatWritable({ outputMode: 'short' });
|
||||
|
||||
const formatOut2 = new BunyanFormatWritable({ outputMode: 'bunyan', levelInString: true });
|
||||
const formatOut2: NodeJS.WritableStream = new BunyanFormatWritable({ outputMode: 'bunyan', levelInString: true });
|
||||
|
||||
const formatOut3 = BunyanFormatWritable({ outputMode: 'short' });
|
||||
const formatOut3: Writable = BunyanFormatWritable({ outputMode: 'short' });
|
||||
|
||||
const formatOut4 = BunyanFormatWritable({ outputMode: 'bunyan', levelInString: true });
|
||||
const formatOut4: NodeJS.WritableStream = BunyanFormatWritable({ outputMode: 'bunyan', levelInString: true });
|
||||
|
||||
15
types/bunyan-format/index.d.ts
vendored
15
types/bunyan-format/index.d.ts
vendored
@ -3,7 +3,7 @@
|
||||
// Definitions by: Piotr Roszatycki <https://github.com/dex4er>
|
||||
// Ashley Abbott <https://github.com/ashpabb>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.6
|
||||
// TypeScript Version: 2.1
|
||||
|
||||
/// <reference types="node" />
|
||||
|
||||
@ -23,11 +23,14 @@ declare namespace BunyanFormatWritable {
|
||||
}
|
||||
}
|
||||
|
||||
declare class BunyanFormatWritable extends Writable {
|
||||
/** Creates a writable stream that formats bunyan records written to it. */
|
||||
constructor(options: BunyanFormatWritable.Options, output?: Writable);
|
||||
}
|
||||
// tslint:disable-next-line no-empty-interface
|
||||
interface BunyanFormatWritable extends Writable {}
|
||||
|
||||
declare function BunyanFormatWritable(options: BunyanFormatWritable.Options, output?: Writable): BunyanFormatWritable;
|
||||
declare var BunyanFormatWritable: {
|
||||
/** Creates a writable stream that formats bunyan records written to it. */
|
||||
(options: BunyanFormatWritable.Options, output?: Writable): BunyanFormatWritable;
|
||||
/** Creates a writable stream that formats bunyan records written to it. */
|
||||
new (options: BunyanFormatWritable.Options, output?: Writable): BunyanFormatWritable;
|
||||
};
|
||||
|
||||
export = BunyanFormatWritable;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user