From 001ee994e3d87dd9c8f36a4209588a0276d392a9 Mon Sep 17 00:00:00 2001 From: Igor Savin Date: Tue, 4 Jun 2019 01:36:08 +0200 Subject: [PATCH] [@types/pino] Document new config option (#35757) * Document new config option (implemented in https://github.com/pinojs/pino-pretty/pull/67) * Fix indentation to be consistent --- types/pino/index.d.ts | 4 ++++ types/pino/pino-tests.ts | 1 + 2 files changed, 5 insertions(+) diff --git a/types/pino/index.d.ts b/types/pino/index.d.ts index ae7e9da522..61ef9db19f 100644 --- a/types/pino/index.d.ts +++ b/types/pino/index.d.ts @@ -259,6 +259,10 @@ declare namespace P { * The key in the JSON object to use as the highlighted message. Default: "msg". */ messageKey?: string; + /** + * The key in the JSON object to use for timestamp display. Default: "time". + */ + timestampKey?: string; /** * If set to true, will add color information to the formatted output message. Default: `false`. */ diff --git a/types/pino/pino-tests.ts b/types/pino/pino-tests.ts index 1a64f11d99..5c87a24ece 100644 --- a/types/pino/pino-tests.ts +++ b/types/pino/pino-tests.ts @@ -133,6 +133,7 @@ const pretty = pino({ errorProps: '', levelFirst: false, messageKey: 'msg', + timestampKey: "timestamp", translateTime: 'UTC:h:MM:ss TT Z', search: 'foo == `bar`' }