diff --git a/types/log4js.d.ts b/types/log4js.d.ts index 7d651c2c..ec26cc1e 100644 --- a/types/log4js.d.ts +++ b/types/log4js.d.ts @@ -263,14 +263,9 @@ export interface CustomAppender { } export interface AppenderModule { - configure: (config: Config, layouts: LayoutsParam) => AppenderGenerator; + configure: (config: Config, layouts: LayoutsParam) => AppenderFunction; } -export type AppenderGenerator = ( - layout: LayoutFunction, - timezoneOffset?: string -) => AppenderFunction; - export type AppenderFunction = (loggingEvent: LoggingEvent) => void; // TODO: Actually add types here... @@ -321,7 +316,7 @@ export interface Levels { FATAL: Level; OFF: Level; levels: Level[]; - getLevel(level: Level | string, defaultLevel: Level): Level; + getLevel(level: Level | string, defaultLevel?: Level): Level; addLevels(customLevels: object): void; } diff --git a/types/test.ts b/types/test.ts index a2f0fafc..b0c8d4ed 100644 --- a/types/test.ts +++ b/types/test.ts @@ -133,7 +133,7 @@ log4js.connectLogger(logger2, { //support for passing in an appender module log4js.configure({ - appenders: { thing: { type: { configure: () => {} }}}, + appenders: { thing: { type: { configure: () => () => {} }}}, categories: { default: { appenders: ['thing'], level: 'debug'}} });