Commit | Line | Data |
---|---|---|
1cbc41d7 | 1 | import type { TransferListItem } from 'node:worker_threads' |
a8706532 JB |
2 | import type * as fastify from 'fastify' |
3 | import { type DynamicThreadPool } from 'poolifier' | |
4 | import { type WorkerData, type WorkerResponse } from '../../src/types.ts' | |
5 | ||
6 | declare module 'fastify' { | |
7 | export interface FastifyInstance extends fastify.FastifyInstance { | |
8 | pool: DynamicThreadPool<WorkerData, WorkerResponse> | |
1cbc41d7 JB |
9 | execute: ( |
10 | data?: WorkerData, | |
11 | name?: string, | |
12 | transferList?: TransferListItem[] | |
13 | ) => Promise<WorkerResponse> | |
a8706532 JB |
14 | } |
15 | } |