phecda-server
Version:
server framework that provide IOC/type-reuse/http&rpc-adaptor
21 lines (18 loc) • 858 B
text/typescript
import { FastifyRequest, FastifyReply, FastifyInstance, FastifyPluginCallback, FastifyRegisterOptions, FastifyPluginOptions, RouteShorthandOptions } from 'fastify';
import { H as HttpCtx, a as HttpOptions } from '../../types-BkU6kQWV.mjs';
import { F as Factory } from '../../core-mOKtuP0F.mjs';
import 'node:http';
import '../../meta-EGS-4cNY.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 };