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 @@ -200,25 +200,28 @@ export default iterateJsdoc(({
200
200
} ;
201
201
} ;
202
202
203
+ const typeTags = utils . filterTags ( ( {
204
+ tag,
205
+ } ) => {
206
+ return utils . tagMightHaveTypePosition ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
207
+ } ) . map ( tagToParsedType ( 'type' ) ) ;
208
+
209
+ const namepathReferencingTags = utils . filterTags ( ( {
210
+ tag,
211
+ } ) => {
212
+ return utils . isNamepathReferencingTag ( tag ) ;
213
+ } ) . map ( tagToParsedType ( 'name' ) ) ;
214
+
215
+ const namepathOrUrlReferencingTags = utils . filterTags ( ( {
216
+ tag,
217
+ } ) => {
218
+ return utils . isNamepathOrUrlReferencingTag ( tag ) ;
219
+ } , true ) . map ( tagToParsedType ( 'namepathOrURL' ) ) ;
220
+
203
221
const tagsWithTypes = [
204
- // Tags with type
205
- ...utils . filterTags ( ( {
206
- tag,
207
- } ) => {
208
- return utils . tagMightHaveTypePosition ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
209
- } ) . map ( tagToParsedType ( 'type' ) ) ,
210
- // Tags with namepaths
211
- ...utils . filterTags ( ( {
212
- tag,
213
- } ) => {
214
- return utils . isNamepathReferencingTag ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
215
- } ) . map ( tagToParsedType ( 'name' ) ) ,
216
- // Inline tags
217
- ...utils . filterTags ( ( {
218
- tag,
219
- } ) => {
220
- return utils . isNamepathOrUrlReferencingTag ( tag ) && ( tag !== 'suppress' || settings . mode !== 'closure' ) ;
221
- } , true ) . map ( tagToParsedType ( 'namepathOrURL' ) ) ,
222
+ ...typeTags ,
223
+ ...namepathReferencingTags ,
224
+ ...namepathOrUrlReferencingTags ,
222
225
] . filter ( ( result ) => {
223
226
// Remove types which failed to parse
224
227
return result ;
You can’t perform that action at this time.
0 commit comments