fastify-rabbitmq
Version:
A Fastify RabbitMQ Plugin Developed in Pure TypeScript.
14 lines (13 loc) • 506 B
JavaScript
import { errors } from "./errors.js";
export const validateOpts = async (options) => {
// Mandatory
if (typeof options.connection === "undefined") {
throw new errors.FASTIFY_RABBIT_MQ_ERR_INVALID_OPTS("connection or findServers must be defined.");
}
// Mandatory
if (typeof options.connection !== "undefined") {
if (typeof options.connection !== "object") {
// we need to do some sort of check here to make sure RabbitMQOptions is "valid"
}
}
};