Merge branch 'master' of github.com:poolifier/poolifier
[poolifier.git] / examples / typescript / http-server-pool / fastify-hybrid / @types / fastify / index.d.ts
1 import type * as fastify from 'fastify'
2 import { type DynamicThreadPool } from 'poolifier'
3 import {
4 type ThreadWorkerData,
5 type ThreadWorkerResponse
6 } from '../../src/types.ts'
7
8 declare 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 listTaskFunctions: () => string[]
17 }
18 }