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 | |
80115618 | 6 | import type { ThreadWorkerData, ThreadWorkerResponse } from '../../src/types.ts' |
3b311539 JB |
7 | |
8 | declare module 'fastify' { | |
9 | export interface FastifyInstance extends fastify.FastifyInstance { | |
10 | pool: DynamicThreadPool<ThreadWorkerData, ThreadWorkerResponse> | |
11 | execute: ( | |
12 | data?: ThreadWorkerData, | |
13 | name?: string, | |
6a3ecc50 | 14 | transferList?: readonly TransferListItem[] |
3b311539 JB |
15 | ) => Promise<ThreadWorkerResponse> |
16 | } | |
17 | } |