File tree 2 files changed +22
-19
lines changed 2 files changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ const hasTag = (jsdoc, targetTagName) => {
458
458
* @param {object } jsdoc
459
459
* @returns {Array }
460
460
*/
461
- const getAllTags = ( jsdoc , includeInlineTags = false ) => {
461
+ const getAllTags = ( jsdoc , includeInlineTags ) => {
462
462
return includeInlineTags ? [
463
463
...jsdoc . tags ,
464
464
...jsdoc . inlineTags ,
Original file line number Diff line number Diff line change @@ -198,25 +198,28 @@ export default iterateJsdoc(({
198
198
} ;
199
199
} ;
200
200
201
+ const typeTags = utils . filterTags ( ( {
202
+ tag,
203
+ } ) => {
204
+ return utils . tagMightHaveTypePosition ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
205
+ } ) . map ( tagToParsedType ( 'type' ) ) ;
206
+
207
+ const namepathReferencingTags = utils . filterTags ( ( {
208
+ tag,
209
+ } ) => {
210
+ return utils . isNamepathReferencingTag ( tag ) ;
211
+ } ) . map ( tagToParsedType ( 'name' ) ) ;
212
+
213
+ const namepathOrUrlReferencingTags = utils . filterTags ( ( {
214
+ tag,
215
+ } ) => {
216
+ return utils . isNamepathOrUrlReferencingTag ( tag ) ;
217
+ } , true ) . map ( tagToParsedType ( 'namepathOrURL' ) ) ;
218
+
201
219
const tagsWithTypes = [
202
- // Tags with type
203
- ...utils . filterTags ( ( {
204
- tag,
205
- } ) => {
206
- return utils . tagMightHaveTypePosition ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
207
- } ) . map ( tagToParsedType ( 'type' ) ) ,
208
- // Tags with namepaths
209
- ...utils . filterTags ( ( {
210
- tag,
211
- } ) => {
212
- return utils . isNamepathReferencingTag ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
213
- } ) . map ( tagToParsedType ( 'name' ) ) ,
214
- // Inline tags
215
- ...utils . filterTags ( ( {
216
- tag,
217
- } ) => {
218
- return utils . isNamepathOrUrlReferencingTag ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
219
- } , true ) . map ( tagToParsedType ( 'namepathOrURL' ) ) ,
220
+ ...typeTags ,
221
+ ...namepathReferencingTags ,
222
+ ...namepathOrUrlReferencingTags ,
220
223
] . filter ( ( result ) => {
221
224
// Remove types which failed to parse
222
225
return result ;
You can’t perform that action at this time.
0 commit comments