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