Commit | Line | Data |
---|---|---|
8faed44f | 1 | import type { TransferListItem } from 'node:worker_threads' |
ded253e2 | 2 | |
3b311539 | 3 | import type * as fastify from 'fastify' |
ef083f7b | 4 | import type { DynamicThreadPool } from 'poolifier' |
ded253e2 | 5 | |
3b311539 JB |
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, | |
6a3ecc50 | 17 | transferList?: readonly TransferListItem[] |
3b311539 JB |
18 | ) => Promise<ThreadWorkerResponse> |
19 | } | |
20 | } |