fix: refine type definition for transferList
[poolifier.git] / examples / typescript / http-server-pool / fastify-worker_threads / @types / fastify / index.d.ts
1 import type { TransferListItem } from 'node:worker_threads'
2
3 import type * as fastify from 'fastify'
4 import type { DynamicThreadPool } from 'poolifier'
5
6 import type { WorkerData, WorkerResponse } from '../../src/types.ts'
7
8 declare module 'fastify' {
9 export interface FastifyInstance extends fastify.FastifyInstance {
10 pool: DynamicThreadPool<WorkerData, WorkerResponse>
11 execute: (
12 data?: WorkerData,
13 name?: string,
14 transferList?: readonly TransferListItem[]
15 ) => Promise<WorkerResponse>
16 }
17 }