@cfxlabsinc/b2b-services
    Preparing search index...
    RouteHandler: FastifyRoutHandler<
        {
            Body: OptionalStatic<T["body"]>;
            Headers: OptionalStatic<T["headers"]>;
            Params: OptionalStatic<T["params"]>;
            Querystring: OptionalStatic<T["querystring"]>;
            Reply: T["response"] extends Record<string, TSchema>
                ? Static<SuccessResponse<T["response"]>>
                : undefined;
        },
    >

    A Fastify route handler, typed based on a given a schema

    This inference avoids having to define both schema in route options and the generic parameter on fastify.get<>(), etc.

    Type Parameters

    • T extends RouteSchema

      The schema defined in a Fastify route options