feat: add fastify poolifier integration example
[poolifier.git] / examples / typescript / http-server-pool / fastify / @types / fastify / index.d.ts
CommitLineData
a8706532
JB
1import type * as fastify from 'fastify'
2import { type DynamicThreadPool } from 'poolifier'
3import { type WorkerData, type WorkerResponse } from '../../src/types.ts'
4
5declare module 'fastify' {
6 export interface FastifyInstance extends fastify.FastifyInstance {
7 pool: DynamicThreadPool<WorkerData, WorkerResponse>
8 execute: (data?: WorkerData, name?: string) => Promise<WorkerResponse>
9 }
10}