| 1 | import type { TransferListItem } from 'node:worker_threads' |
| 2 | |
| 3 | import type * as fastify from 'fastify' |
| 4 | import type { DynamicThreadPool } from 'poolifier' |
| 5 | |
| 6 | import { |
| 7 | type ThreadWorkerData, |
| 8 | type ThreadWorkerResponse |
| 9 | } from '../../src/types.ts' |
| 10 | |
| 11 | declare module 'fastify' { |
| 12 | export interface FastifyInstance extends fastify.FastifyInstance { |
| 13 | pool: DynamicThreadPool<ThreadWorkerData, ThreadWorkerResponse> |
| 14 | execute: ( |
| 15 | data?: ThreadWorkerData, |
| 16 | name?: string, |
| 17 | transferList?: readonly TransferListItem[] |
| 18 | ) => Promise<ThreadWorkerResponse> |
| 19 | } |
| 20 | } |