From: Jérôme Benoit Date: Tue, 7 May 2024 20:07:09 +0000 (+0200) Subject: refactor: refine UUID type definition X-Git-Tag: v4.0.3~6 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=84781cd695f07e5b367219d53000ed60a5497a91;p=poolifier.git refactor: refine UUID type definition Signed-off-by: Jérôme Benoit --- diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 07fec75f..ad7adce3 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -92,8 +92,13 @@ export abstract class AbstractPool< * * When we receive a message from the worker, we get a map entry with the promise resolve/reject bound to the message id. */ - protected promiseResponseMap: Map> = - new Map>() + protected promiseResponseMap: Map< + `${string}-${string}-${string}-${string}-${string}`, + PromiseResponseWrapper + > = new Map< + `${string}-${string}-${string}-${string}-${string}`, + PromiseResponseWrapper + >() /** * Worker choice strategies context referencing worker choice algorithms implementation.