Commit | Line | Data |
---|---|---|
3b311539 JB |
1 | import type * as fastify from 'fastify' |
2 | import { type DynamicThreadPool } from 'poolifier' | |
3 | import { | |
4 | type ThreadWorkerData, | |
5 | type ThreadWorkerResponse | |
6 | } from '../../src/types.ts' | |
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, | |
14 | transferList?: TransferListItem[] | |
15 | ) => Promise<ThreadWorkerResponse> | |
16 | } | |
17 | } |