mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
pino accepts NodeJS.WritableStream streams too (#27635)
This commit is contained in:
committed by
Sheetal Nandi
parent
ab5b7b9449
commit
0dcfb2b483
Vendored
+2
-2
@@ -19,7 +19,7 @@ export = P;
|
||||
* relative protocol is enabled. Default: process.stdout
|
||||
* @returns a new logger instance.
|
||||
*/
|
||||
declare function P(optionsOrStream?: P.LoggerOptions | stream.Writable | stream.Duplex | stream.Transform): P.Logger;
|
||||
declare function P(optionsOrStream?: P.LoggerOptions | stream.Writable | stream.Duplex | stream.Transform | NodeJS.WritableStream): P.Logger;
|
||||
|
||||
/**
|
||||
* @param [options]: an options object
|
||||
@@ -27,7 +27,7 @@ declare function P(optionsOrStream?: P.LoggerOptions | stream.Writable | stream.
|
||||
* relative protocol is enabled. Default: process.stdout
|
||||
* @returns a new logger instance.
|
||||
*/
|
||||
declare function P(options: P.LoggerOptions, stream: stream.Writable | stream.Duplex | stream.Transform): P.Logger;
|
||||
declare function P(options: P.LoggerOptions, stream: stream.Writable | stream.Duplex | stream.Transform | NodeJS.WritableStream): P.Logger;
|
||||
|
||||
declare namespace P {
|
||||
/**
|
||||
|
||||
@@ -93,3 +93,6 @@ log.level = 'info';
|
||||
|
||||
pino.levels.values.error === 50;
|
||||
pino.levels.labels[50] === 'error';
|
||||
|
||||
const logstderr: pino.Logger = pino(process.stderr);
|
||||
logstderr.error('on stderr instead of stdout');
|
||||
|
||||
Reference in New Issue
Block a user