From: Jérôme Benoit Date: Sun, 13 Aug 2023 12:58:22 +0000 (+0200) Subject: fix: fix fastify worker_threads type definition X-Git-Tag: v2.6.25~10 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=1cbc41d7d690ae5a498280b0cb898eeec4522ec6;p=poolifier.git fix: fix fastify worker_threads type definition Signed-off-by: Jérôme Benoit --- diff --git a/examples/typescript/http-server-pool/fastify-worker_threads/@types/fastify/index.d.ts b/examples/typescript/http-server-pool/fastify-worker_threads/@types/fastify/index.d.ts index 0e43ad26..e2ec4062 100644 --- a/examples/typescript/http-server-pool/fastify-worker_threads/@types/fastify/index.d.ts +++ b/examples/typescript/http-server-pool/fastify-worker_threads/@types/fastify/index.d.ts @@ -1,3 +1,4 @@ +import type { TransferListItem } from 'node:worker_threads' import type * as fastify from 'fastify' import { type DynamicThreadPool } from 'poolifier' import { type WorkerData, type WorkerResponse } from '../../src/types.ts' @@ -5,6 +6,10 @@ import { type WorkerData, type WorkerResponse } from '../../src/types.ts' declare module 'fastify' { export interface FastifyInstance extends fastify.FastifyInstance { pool: DynamicThreadPool - execute: (data?: WorkerData, name?: string) => Promise + execute: ( + data?: WorkerData, + name?: string, + transferList?: TransferListItem[] + ) => Promise } }