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