mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-24 06:35:49 +03:00
Added JSDoc to MaxLimit constructor
refs https://github.com/TryGhost/Team/issues/587 - Having a JSDoc gives better intellisense when the class is instantiated and provides clues about what each parameter might be used for
This commit is contained in:
parent
57e24b3677
commit
0838186abd
@ -28,6 +28,16 @@ class Limit {
|
||||
}
|
||||
|
||||
class MaxLimit extends Limit {
|
||||
/**
|
||||
*
|
||||
* @param {Object} options
|
||||
* @param {String} options.name - name of the limit
|
||||
* @param {Object} options.config - limit configuration
|
||||
* @param {Number} options.config.max - maximum limit the limit would check against
|
||||
* @param {Function} options.config.currentCountQuery - query checking the state that would be compared against 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});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user