From 8f5818a5f683d0ead6788387c2c1d8557e9b5a33 Mon Sep 17 00:00:00 2001 From: Naor Peled Date: Fri, 13 Jan 2023 20:53:47 +0200 Subject: [PATCH] fix(request/log): resolve wrong type for additional info (#222) Co-authored-by: Sleavely <677030+sleavely@users.noreply.github.com> --- index.d.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 603a0f3..d71d286 100644 --- a/index.d.ts +++ b/index.d.ts @@ -60,10 +60,19 @@ export declare type HandlerFunction = ( res: Response, next?: NextFunction ) => void | any | Promise; + export declare type LoggerFunction = ( message?: any, - ...optionalParams: any[] + additionalInfo?: LoggerFunctionAdditionalInfo ) => void; +export declare type LoggerFunctionAdditionalInfo = + | string + | number + | boolean + | null + | LoggerFunctionAdditionalInfo[] + | { [key: string]: LoggerFunctionAdditionalInfo }; + export declare type NextFunction = () => void; export declare type TimestampFunction = () => string; export declare type SerializerFunction = (body: object) => string;