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