0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-17 23:44:39 -05:00

Added JSDoc to FlagLimit constructor

refs https://github.com/TryGhost/Team/issues/597

- Before adding more parameters documented existing ones
This commit is contained in:
Naz 2021-04-05 16:03:36 +12:00
parent c16f13b106
commit 6741818265

View file

@ -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});