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