Commit | Line | Data |
---|---|---|
1cbc41d7 | 1 | import type { TransferListItem } from 'node:worker_threads' |
a8706532 | 2 | import type * as fastify from 'fastify' |
ef083f7b JB |
3 | import type { DynamicThreadPool } from 'poolifier' |
4 | import type { WorkerData, WorkerResponse } from '../../src/types.ts' | |
a8706532 JB |
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 | } |