| 1 | import type { TransferListItem } from 'node:worker_threads' |
| 2 | import type * as fastify from 'fastify' |
| 3 | import type { DynamicThreadPool } from 'poolifier' |
| 4 | import { |
| 5 | type ThreadWorkerData, |
| 6 | type ThreadWorkerResponse |
| 7 | } from '../../src/types.ts' |
| 8 | |
| 9 | declare 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 | } |