From c8dd1df6152ccca5315405e6769798bbc2cd14cc Mon Sep 17 00:00:00 2001 From: Alex Mikhalev Date: Sun, 19 Aug 2018 19:31:36 -0600 Subject: [PATCH] Use build in pino.pretty definitions --- server/logging/prettyPrint.ts | 2 +- server/types/pino.d.ts | 22 ---------------------- 2 files changed, 1 insertion(+), 23 deletions(-) delete mode 100644 server/types/pino.d.ts diff --git a/server/logging/prettyPrint.ts b/server/logging/prettyPrint.ts index a28b6fd..a895b3d 100644 --- a/server/logging/prettyPrint.ts +++ b/server/logging/prettyPrint.ts @@ -1,5 +1,5 @@ import chalk from "chalk"; -import pretty = require("pino/pretty"); +import { pretty } from "pino"; type Level = "default" | 60 | 50 | 40 | 30 | 20 | 10; diff --git a/server/types/pino.d.ts b/server/types/pino.d.ts deleted file mode 100644 index 2dc005e..0000000 --- a/server/types/pino.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -declare module "pino/pretty" { - import { Transform } from "stream"; - - interface Formatter { - (value: any): string; - } - - interface PrettyOptions { - timeTransOnly?: boolean; - formatter?: Formatter; - levelFirst?: boolean; - messageKey?: string; - forceColor?: boolean; - } - - interface Pretty { - (opts: PrettyOptions): Transform; - } - - const pretty: Pretty; - export = pretty; -}