mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 23:37:43 +03:00
Added jsdocs to UrlGenerator/Resource classes
no issue - The @param {Resource} syntax was not semantically correct. After the change TypeScript is picking up a correct parameter
This commit is contained in:
parent
33bc3c9011
commit
05e12d4b5a
@ -6,6 +6,10 @@ const errors = require('@tryghost/errors');
|
||||
* Resource cache.
|
||||
*/
|
||||
class Resource extends EventEmitter {
|
||||
/**
|
||||
* @param {('posts'|'pages'|'tags'|'authors')} type - of the resource
|
||||
* @param {Object} obj - object data to sotre
|
||||
*/
|
||||
constructor(type, obj) {
|
||||
super();
|
||||
|
||||
|
@ -142,7 +142,7 @@ class UrlGenerator {
|
||||
|
||||
/**
|
||||
* @description Try to own a resource and generate it's url if so.
|
||||
* @param {Resource} resource
|
||||
* @param {import('./Resource')} resource - instance of the Resource class
|
||||
* @returns {boolean}
|
||||
* @private
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user