Use build in pino.pretty definitions
This commit is contained in:
parent
26e9b49499
commit
c8dd1df615
@ -1,5 +1,5 @@
|
|||||||
import chalk from "chalk";
|
import chalk from "chalk";
|
||||||
import pretty = require("pino/pretty");
|
import { pretty } from "pino";
|
||||||
|
|
||||||
type Level = "default" | 60 | 50 | 40 | 30 | 20 | 10;
|
type Level = "default" | 60 | 50 | 40 | 30 | 20 | 10;
|
||||||
|
|
||||||
|
22
server/types/pino.d.ts
vendored
22
server/types/pino.d.ts
vendored
@ -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;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user