fix: refine type definition for transferList
[poolifier.git] / examples / typescript / http-server-pool / fastify-worker_threads / @types / fastify / index.d.ts
index 93fb69eb806a7a112aebe7a72a9fbc2ef1df49f3..899aa1a028926166853cb383eaf8b2dc7cdebf46 100644 (file)
@@ -1,6 +1,8 @@
 import type { TransferListItem } from 'node:worker_threads'
+
 import type * as fastify from 'fastify'
 import type { DynamicThreadPool } from 'poolifier'
+
 import type { WorkerData, WorkerResponse } from '../../src/types.ts'
 
 declare module 'fastify' {
@@ -9,7 +11,7 @@ declare module 'fastify' {
     execute: (
       data?: WorkerData,
       name?: string,
-      transferList?: TransferListItem[]
+      transferList?: readonly TransferListItem[]
     ) => Promise<WorkerResponse>
   }
 }