fix: refine type definition for transferList
[poolifier.git] / examples / typescript / http-server-pool / fastify-worker_threads / @types / fastify / index.d.ts
index 0e43ad26fe6c42ffa4481b55947f64a574467882..899aa1a028926166853cb383eaf8b2dc7cdebf46 100644 (file)
@@ -1,10 +1,17 @@
+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'
+import type { DynamicThreadPool } from 'poolifier'
+
+import type { WorkerData, WorkerResponse } from '../../src/types.ts'
 
 declare module 'fastify' {
   export interface FastifyInstance extends fastify.FastifyInstance {
     pool: DynamicThreadPool<WorkerData, WorkerResponse>
-    execute: (data?: WorkerData, name?: string) => Promise<WorkerResponse>
+    execute: (
+      data?: WorkerData,
+      name?: string,
+      transferList?: readonly TransferListItem[]
+    ) => Promise<WorkerResponse>
   }
 }