refactor: cleanup type import
[poolifier.git] / examples / typescript / http-server-pool / fastify-worker_threads / @types / fastify / index.d.ts
1 import type { TransferListItem } from 'node:worker_threads'
2 import type * as fastify from 'fastify'
3 import type { DynamicThreadPool } from 'poolifier'
4 import type { WorkerData, WorkerResponse } from '../../src/types.ts'
5
6 declare module 'fastify' {
7 export interface FastifyInstance extends fastify.FastifyInstance {
8 pool: DynamicThreadPool<WorkerData, WorkerResponse>
9 execute: (
10 data?: WorkerData,
11 name?: string,
12 transferList?: TransferListItem[]
13 ) => Promise<WorkerResponse>
14 }
15 }