UNPKG

fast-controllers

Version:

class based controllers, and implied folder route mapping for Fastify

9 lines (8 loc) 475 B
import type { FastifyInstance, FastifyPluginOptions, HTTPMethods, RouteOptions } from 'fastify'; import type FastController from './FastController'; type FastControllerOptions = FastifyPluginOptions & { path: string; }; export default function fastControllers(instance: FastifyInstance, options: FastControllerOptions): Promise<undefined[]>; declare function prepareController(controller: FastController, method: HTTPMethods): RouteOptions; export { prepareController };