mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
feat(pino): remove addLevel which does not exist (#37988)
* feat(pino): remove addLevel which does not exist * feat(pino): remove add test
This commit is contained in:
parent
b4d70e1e77
commit
10af0f5225
10
types/pino/index.d.ts
vendored
10
types/pino/index.d.ts
vendored
@ -397,16 +397,6 @@ declare namespace P {
|
||||
*/
|
||||
levelVal: number;
|
||||
|
||||
/**
|
||||
* Defines a new level on the logger instance. Returns `true` on success and `false` if there was a conflict (level name or number already exists).
|
||||
* When using this method, the current level of the logger instance does not change. You must adjust the level with the `level` property after
|
||||
* adding your custom level.
|
||||
*
|
||||
* @param name: defines the method name of the new level
|
||||
* @param lvl: value for the level, e.g. `35` is between `info` and `warn`
|
||||
* @returns whether level was correctly created or not
|
||||
*/
|
||||
addLevel(name: string, lvl: number): boolean;
|
||||
/**
|
||||
* Registers a listener function that is triggered when the level is changed.
|
||||
* Note: When browserified, this functionality will only be available if the `events` module has been required elsewhere
|
||||
|
||||
@ -71,7 +71,6 @@ if (log.levelVal === 30) {
|
||||
console.log('logger level is `info`');
|
||||
}
|
||||
|
||||
log.addLevel('myLevel', 35);
|
||||
log.level = 'myLevel';
|
||||
log.myLevel('a message');
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user