Skip to content

Commit

Permalink
Merge b891d4f into 3ec9946
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Aug 26, 2021
2 parents 3ec9946 + b891d4f commit b4100ee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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",
Expand Down
11 changes: 1 addition & 10 deletions pino.d.ts
Expand Up @@ -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;
Expand Down Expand Up @@ -728,17 +727,9 @@ declare namespace P {
};
}

type Logger = BaseLogger & { [key: string]: LogFn };
type Logger = BaseLogger & Record<string, any>;

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.
*/
Expand Down
6 changes: 5 additions & 1 deletion test/types/pino.test-d.ts
Expand Up @@ -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",
Expand Down Expand Up @@ -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;
}

0 comments on commit b4100ee

Please sign in to comment.