mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 08:25:06 +03:00
Added JSDocs to the UrlGenerator class
refs https://github.com/TryGhost/Toolbox/issues/127 - Before refactoring the URL Generator constructor to have a smaller construcotr, documented current state for future reference
This commit is contained in:
parent
31e103be9d
commit
33d02cddfe
@ -33,6 +33,14 @@ const EXPANSIONS = [{
|
||||
* Each router is represented by a url generator.
|
||||
*/
|
||||
class UrlGenerator {
|
||||
/**
|
||||
*
|
||||
* @param {Object} router instance of a frontend Routes (e.g. CollectionRouter, PreviewRouter)
|
||||
* @param {Object} queue instance of the backend Queue
|
||||
* @param {Object} resources instance of the backend Resources
|
||||
* @param {Object} urls instance of the backend URLs (used to store the urls)
|
||||
* @param {Number} position an ID of the generator
|
||||
*/
|
||||
constructor(router, queue, resources, urls, position) {
|
||||
this.router = router;
|
||||
this.queue = queue;
|
||||
@ -246,6 +254,7 @@ class UrlGenerator {
|
||||
|
||||
/**
|
||||
* @description Get all urls of this url generator.
|
||||
* NOTE: the method is only used for testing purposes at the moment.
|
||||
* @returns {Array}
|
||||
*/
|
||||
getUrls() {
|
||||
|
Loading…
Reference in New Issue
Block a user