From f8d2316a55086c37c64c4f900ce99e28e2396b46 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 ae7e9da522a451b..61ef9db19f28cab 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 1a64f11d99158ec..5c87a24ece1ec29 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`' }