UNPKG

phecda-server

Version:

server framework that provide IOC/type-reuse/http&rpc-adaptor

21 lines (18 loc) 858 B
import { FastifyRequest, FastifyReply, FastifyInstance, FastifyPluginCallback, FastifyRegisterOptions, FastifyPluginOptions, RouteShorthandOptions } from 'fastify'; import { H as HttpCtx, a as HttpOptions } from '../../types-DtiHAXQB.mjs'; import { F as Factory } from '../../core-D1YYphEn.mjs'; import 'node:http'; import '../../meta-DNF6Fl27.mjs'; import 'phecda-core'; interface FastifyCtx extends HttpCtx { type: 'fastify'; request: FastifyRequest; response: FastifyReply; app: FastifyInstance; } type Addon = FastifyPluginCallback; declare function bind(fastify: FastifyInstance, data: Awaited<ReturnType<typeof Factory>>, opts?: HttpOptions & { fastifyOpts?: FastifyRegisterOptions<FastifyPluginOptions>; }): void; declare function Fastify(opts: RouteShorthandOptions): any; export { type Addon, Fastify, type FastifyCtx, bind };