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