import { FastifyBaseLogger, FastifyInstance, FastifyPluginAsync, RawReplyDefaultExpression, RawRequestDefaultExpression, RawServerBase, } from 'fastify'; import { ZodTypeProvider } from 'fastify-type-provider-zod'; export type Instance = FastifyInstance< RawServerBase, RawRequestDefaultExpression, RawReplyDefaultExpression, FastifyBaseLogger, ZodTypeProvider >; export type RegisterPlugin = FastifyPluginAsync< Record, RawServerBase, ZodTypeProvider >; export function makeRouter(cb: (app: Instance) => void): { register: RegisterPlugin; } { return { register: async (app) => { cb(app); }, }; }