fastify-rabbitmq
Version:
A Fastify RabbitMQ Plugin Developed in Pure TypeScript.
16 lines • 748 B
TypeScript
import { FastifyRabbitMQOptions } from "./decorate";
/**
* Validate Options
*
* The plugin validates only the *shape* of `connection` -- that it is a
* non-empty connection string or a `ConnectionOptions` object. Parsing the URL
* and validating the broker options (hosts, TLS, reconnect, etc.) is delegated
* to `rabbitmq-client`. The shape guard exists because `new Connection(...)`
* accepts garbage (a number, an array, `null`, `{}`) without throwing and then
* silently fails to connect at runtime; rejecting it here surfaces a clear
* registration-time error instead.
* @since 1.0.0
* @param options
*/
export declare const validateOpts: (options: FastifyRabbitMQOptions) => Promise<void>;
//# sourceMappingURL=validation.d.ts.map