0e43ad26fe6c42ffa4481b55947f64a574467882
[poolifier.git] / index.d.ts
1 import type * as fastify from 'fastify'
2 import { type DynamicThreadPool } from 'poolifier'
3 import { type WorkerData, type WorkerResponse } from '../../src/types.ts'
4
5 declare module 'fastify' {
6 export interface FastifyInstance extends fastify.FastifyInstance {
7 pool: DynamicThreadPool<WorkerData, WorkerResponse>
8 execute: (data?: WorkerData, name?: string) => Promise<WorkerResponse>
9 }
10 }