fastify-rabbitmq
Version:
A Fastify RabbitMQ Plugin Developed in Pure TypeScript.
18 lines (17 loc) • 662 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateOpts = void 0;
const errors_js_1 = require("./errors.js");
const validateOpts = async (options) => {
// Mandatory
if (typeof options.connection === "undefined") {
throw new errors_js_1.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"
}
}
};
exports.validateOpts = validateOpts;