From 1546e8047762d01e570356e844092aa5d3726166 Mon Sep 17 00:00:00 2001 From: Frazer Smith Date: Fri, 28 Nov 2025 10:09:57 +0000 Subject: [PATCH] chore(auth): add jsdoc types --- auth.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/auth.js b/auth.js index 607fb26..236313c 100644 --- a/auth.js +++ b/auth.js @@ -5,6 +5,7 @@ const reusify = require('reusify') const DEFAULT_RELATION = 'or' +/** @type {typeof import('./types/index').fastifyAuth} */ function fastifyAuth (fastify, opts, next) { if (opts.defaultRelation && opts.defaultRelation !== 'or' && opts.defaultRelation !== 'and') { return next(new Error("The value of default relation should be one of ['or', 'and']")) @@ -18,6 +19,7 @@ function fastifyAuth (fastify, opts, next) { next() } +/** @param {import('./types/index').FastifyAuthPluginOptions} pluginOptions */ function auth (pluginOptions) { return function (functions, opts) { if (!Array.isArray(functions)) {