diff --git a/package.json b/package.json index fb7bf248b..1251ac569 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "bunyan": "^1.8.14", "docsify-cli": "^4.4.1", "eslint": "^7.17.0", - "eslint-config-standard": "^16.0.2", + "eslint-config-standard": "^16.0.3", "eslint-plugin-import": "^2.22.1", "eslint-plugin-node": "^11.1.0", "eslint-plugin-promise": "^5.1.0", diff --git a/pino.d.ts b/pino.d.ts index 0e8e1ff02..2cc74b426 100644 --- a/pino.d.ts +++ b/pino.d.ts @@ -50,7 +50,6 @@ declare namespace P { /** * Holds the current log format version (as output in the v property of each log record). */ - const LOG_VERSION: number; const levels: LevelMapping; const symbols: { readonly setLevelSym: unique symbol; @@ -728,17 +727,9 @@ declare namespace P { }; } - type Logger = BaseLogger & { [key: string]: LogFn }; + type Logger = BaseLogger & Record; interface BaseLogger extends EventEmitter { - /** - * Exposes the current version of Pino. - */ - readonly pino: string; - /** - * Holds the current log format version (as output in the v property of each log record). - */ - readonly LOG_VERSION: number; /** * Exposes the Pino package version. Also available on the exported pino function. */ diff --git a/test/types/pino.test-d.ts b/test/types/pino.test-d.ts index d6f8c5391..b41fd92f6 100644 --- a/test/types/pino.test-d.ts +++ b/test/types/pino.test-d.ts @@ -106,7 +106,7 @@ childRedacted.info({ msg: "logged with redacted properties", path: "Not shown", }); -const childAnotherRedacted = pino().child({}, { +const childAnotherRedacted = pino().child({}, { redact: { paths: ["anotherPath"], censor: "Not the log you\re looking for", @@ -267,3 +267,7 @@ const logLine: pino.LogDescriptor = { time: new Date().getTime(), aCustomProperty: true, }; + +interface CustomLogger extends pino.Logger { + customMethod(msg: string, ...args: unknown[]): void; +}