From 8bd389c3967ebb58f5aa8ac88823d92728583395 Mon Sep 17 00:00:00 2001 From: miketamis Date: Mon, 24 Jun 2024 23:03:15 +0700 Subject: [PATCH] Update pino.d.ts Made it so you can't put objects after msg unless it has %s etc in it. --- pino.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pino.d.ts b/pino.d.ts index f8cad6f07..ab67532de 100644 --- a/pino.d.ts +++ b/pino.d.ts @@ -317,8 +317,8 @@ declare namespace pino { // TODO: why is this different from `obj: object` or `obj: any`? /* tslint:disable:no-unnecessary-generics */ (obj: T, msg?: string, ...args: any[]): void; - (obj: unknown, msg?: string, ...args: any[]): void; - (msg: string, ...args: any[]): void; + (msg: string): void; + (msg: `${string}%${'s' | 'd' | 'O' | 'o' | 'j'}${string}`, ...args: any[]): void; } interface LoggerOptions {