From 67418182654cdf59fb869b51fa9c4396bcf3ab36 Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 5 Apr 2021 16:03:36 +1200 Subject: [PATCH] Added JSDoc to FlagLimit constructor refs https://github.com/TryGhost/Team/issues/597 - Before adding more parameters documented existing ones --- ghost/limit-service/lib/limit.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ghost/limit-service/lib/limit.js b/ghost/limit-service/lib/limit.js index 44287cafc7..aa555e2bc3 100644 --- a/ghost/limit-service/lib/limit.js +++ b/ghost/limit-service/lib/limit.js @@ -111,6 +111,15 @@ class MaxLimit extends Limit { } class FlagLimit extends Limit { + /** + * + * @param {Object} options + * @param {String} options.name - name of the limit + * @param {Object} options.config - limit configuration + * @param {Number} options.config.disabled - disabled/enabled flag for the limit + * @param {String} options.helpLink - URL to the resource explaining how the limit works + * @param {Object} options.db - instance of knex db connection that currentCountQuery can use to run state check through + */ constructor({name, config, helpLink, db}) { super({name, error: config.error || '', helpLink, db});