From 8edece5060eb00920a3778cec0a471d46c8ddddb Mon Sep 17 00:00:00 2001 From: Richard J <106497642+richard-stafflink@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:50:40 +1000 Subject: [PATCH 1/3] index.d.ts: Expose the flush method on the return type --- index.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 09f1f73..455b510 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,7 +11,9 @@ declare namespace PinoSeq { onError?: (e: Error) => void; } - function createStream(config: PinoSeq.SeqConfig): Writable; + function createStream(config: PinoSeq.SeqConfig): Writable & { _logger: seq.Logger; flush: () => void }; + // Or perhaps just: + // function createStream(config: PinoSeq.SeqConfig): Writable & { flush: () => void }; } export = PinoSeq; From adbd358de8d8a00e0be8d8f1647f7fe27d4ccd44 Mon Sep 17 00:00:00 2001 From: Richard J <106497642+richard-stafflink@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:59:16 +1000 Subject: [PATCH 2/3] Update index.d.ts --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 455b510..4ea1a52 100644 --- a/index.d.ts +++ b/index.d.ts @@ -11,7 +11,7 @@ declare namespace PinoSeq { onError?: (e: Error) => void; } - function createStream(config: PinoSeq.SeqConfig): Writable & { _logger: seq.Logger; flush: () => void }; + function createStream(config: PinoSeq.SeqConfig): Writable & { _logger: seq.Logger; flushBuffer: () => void }; // Or perhaps just: // function createStream(config: PinoSeq.SeqConfig): Writable & { flush: () => void }; } From 560eb6c081ebc3a9bbb1ee5fc8f83abb2861c84a Mon Sep 17 00:00:00 2001 From: Richard J <106497642+richard-stafflink@users.noreply.github.com> Date: Tue, 26 Mar 2024 13:59:30 +1000 Subject: [PATCH 3/3] Update index.d.ts --- index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index 4ea1a52..b51b13b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -13,7 +13,7 @@ declare namespace PinoSeq { function createStream(config: PinoSeq.SeqConfig): Writable & { _logger: seq.Logger; flushBuffer: () => void }; // Or perhaps just: - // function createStream(config: PinoSeq.SeqConfig): Writable & { flush: () => void }; + // function createStream(config: PinoSeq.SeqConfig): Writable & { flushBuffer: () => void }; } export = PinoSeq;