From 1cbc41d7d690ae5a498280b0cb898eeec4522ec6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sun, 13 Aug 2023 14:58:22 +0200 Subject: [PATCH] fix: fix fastify worker_threads type definition MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- .../fastify-worker_threads/@types/fastify/index.d.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 } } -- 2.34.1