You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, pino's TS declaration allows using default log levels when useOnlyCustomLevels is true. This following code will result in a runtime error:
import{pino}from'pino';constlogger=pino({customLevels: {customInfo: 10},useOnlyCustomLevels: true,});logger.info('123');// TS should warn here ?logger.customInfo('123');// should work fine
Expected behavior:
import{pino}from'pino';constlogger=pino({customLevels: {customInfo: 10},useOnlyCustomLevels: true,});logger.info('123');// TS errors herelogger.customInfo('123');// works fine