fix: refine type definition for transferList
[poolifier.git] / examples / typescript / http-server-pool / fastify-worker_threads / @types / fastify / index.d.ts
index e2ec4062820d299647132f7ac0306127e0ebe57e..899aa1a028926166853cb383eaf8b2dc7cdebf46 100644 (file)
@@ -1,7 +1,9 @@
 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 {
@@ -9,7 +11,7 @@ declare module 'fastify' {
     execute: (
       data?: WorkerData,
       name?: string,
-      transferList?: TransferListItem[]
+      transferList?: readonly TransferListItem[]
     ) => Promise<WorkerResponse>
   }
 }