eslint-plugin-jsdoc 52.0.3 → 52.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (357) hide show
  1. package/dist/WarnSettings.cjs +35 -18
  2. package/dist/WarnSettings.cjs.map +1 -1
  3. package/dist/alignTransform.cjs +305 -224
  4. package/dist/alignTransform.cjs.map +1 -1
  5. package/dist/defaultTagOrder.cjs +43 -132
  6. package/dist/defaultTagOrder.cjs.map +1 -1
  7. package/dist/exportParser.cjs +696 -478
  8. package/dist/exportParser.cjs.map +1 -1
  9. package/dist/generateRule.cjs +242 -0
  10. package/dist/generateRule.cjs.map +1 -0
  11. package/dist/getDefaultTagStructureForMode.cjs +288 -184
  12. package/dist/getDefaultTagStructureForMode.cjs.map +1 -1
  13. package/dist/getJsdocProcessorPlugin.cjs +550 -364
  14. package/dist/getJsdocProcessorPlugin.cjs.map +1 -1
  15. package/dist/getJsdocProcessorPlugin.d.ts +65 -68
  16. package/dist/getJsdocProcessorPlugin.d.ts.map +1 -1
  17. package/dist/index.cjs +383 -398
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.ts +6 -11
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/iterateJsdoc.cjs +1988 -1528
  22. package/dist/iterateJsdoc.cjs.map +1 -1
  23. package/dist/iterateJsdoc.d.ts +349 -358
  24. package/dist/iterateJsdoc.d.ts.map +1 -1
  25. package/dist/jsdocUtils.cjs +1376 -1009
  26. package/dist/jsdocUtils.cjs.map +1 -1
  27. package/dist/rules/checkAccess.cjs +36 -29
  28. package/dist/rules/checkAccess.cjs.map +1 -1
  29. package/dist/rules/checkAlignment.cjs +54 -41
  30. package/dist/rules/checkAlignment.cjs.map +1 -1
  31. package/dist/rules/checkExamples.cjs +484 -327
  32. package/dist/rules/checkExamples.cjs.map +1 -1
  33. package/dist/rules/checkIndentation.cjs +65 -50
  34. package/dist/rules/checkIndentation.cjs.map +1 -1
  35. package/dist/rules/checkLineAlignment.cjs +311 -220
  36. package/dist/rules/checkLineAlignment.cjs.map +1 -1
  37. package/dist/rules/checkParamNames.cjs +335 -227
  38. package/dist/rules/checkParamNames.cjs.map +1 -1
  39. package/dist/rules/checkPropertyNames.cjs +106 -78
  40. package/dist/rules/checkPropertyNames.cjs.map +1 -1
  41. package/dist/rules/checkSyntax.cjs +34 -21
  42. package/dist/rules/checkSyntax.cjs.map +1 -1
  43. package/dist/rules/checkTagNames.cjs +210 -188
  44. package/dist/rules/checkTagNames.cjs.map +1 -1
  45. package/dist/rules/checkTemplateNames.cjs +178 -121
  46. package/dist/rules/checkTemplateNames.cjs.map +1 -1
  47. package/dist/rules/checkTypes.cjs +385 -291
  48. package/dist/rules/checkTypes.cjs.map +1 -1
  49. package/dist/rules/checkValues.cjs +146 -100
  50. package/dist/rules/checkValues.cjs.map +1 -1
  51. package/dist/rules/convertToJsdocComments.cjs +306 -228
  52. package/dist/rules/convertToJsdocComments.cjs.map +1 -1
  53. package/dist/rules/emptyTags.cjs +72 -62
  54. package/dist/rules/emptyTags.cjs.map +1 -1
  55. package/dist/rules/implementsOnClasses.cjs +56 -36
  56. package/dist/rules/implementsOnClasses.cjs.map +1 -1
  57. package/dist/rules/importsAsDependencies.cjs +99 -62
  58. package/dist/rules/importsAsDependencies.cjs.map +1 -1
  59. package/dist/rules/informativeDocs.cjs +142 -105
  60. package/dist/rules/informativeDocs.cjs.map +1 -1
  61. package/dist/rules/linesBeforeBlock.cjs +105 -70
  62. package/dist/rules/linesBeforeBlock.cjs.map +1 -1
  63. package/dist/rules/matchDescription.cjs +222 -160
  64. package/dist/rules/matchDescription.cjs.map +1 -1
  65. package/dist/rules/matchName.cjs +128 -73
  66. package/dist/rules/matchName.cjs.map +1 -1
  67. package/dist/rules/multilineBlocks.cjs +352 -235
  68. package/dist/rules/multilineBlocks.cjs.map +1 -1
  69. package/dist/rules/noBadBlocks.cjs +86 -63
  70. package/dist/rules/noBadBlocks.cjs.map +1 -1
  71. package/dist/rules/noBlankBlockDescriptions.cjs +57 -35
  72. package/dist/rules/noBlankBlockDescriptions.cjs.map +1 -1
  73. package/dist/rules/noBlankBlocks.cjs +48 -26
  74. package/dist/rules/noBlankBlocks.cjs.map +1 -1
  75. package/dist/rules/noDefaults.cjs +79 -52
  76. package/dist/rules/noDefaults.cjs.map +1 -1
  77. package/dist/rules/noMissingSyntax.cjs +165 -115
  78. package/dist/rules/noMissingSyntax.cjs.map +1 -1
  79. package/dist/rules/noMultiAsterisks.cjs +89 -48
  80. package/dist/rules/noMultiAsterisks.cjs.map +1 -1
  81. package/dist/rules/noRestrictedSyntax.cjs +79 -45
  82. package/dist/rules/noRestrictedSyntax.cjs.map +1 -1
  83. package/dist/rules/noTypes.cjs +80 -59
  84. package/dist/rules/noTypes.cjs.map +1 -1
  85. package/dist/rules/noUndefinedTypes.cjs +388 -297
  86. package/dist/rules/noUndefinedTypes.cjs.map +1 -1
  87. package/dist/rules/requireAsteriskPrefix.cjs +159 -108
  88. package/dist/rules/requireAsteriskPrefix.cjs.map +1 -1
  89. package/dist/rules/requireDescription.cjs +129 -89
  90. package/dist/rules/requireDescription.cjs.map +1 -1
  91. package/dist/rules/requireDescriptionCompleteSentence.cjs +262 -201
  92. package/dist/rules/requireDescriptionCompleteSentence.cjs.map +1 -1
  93. package/dist/rules/requireExample.cjs +104 -73
  94. package/dist/rules/requireExample.cjs.map +1 -1
  95. package/dist/rules/requireFileOverview.cjs +129 -75
  96. package/dist/rules/requireFileOverview.cjs.map +1 -1
  97. package/dist/rules/requireHyphenBeforeParamDescription.cjs +133 -85
  98. package/dist/rules/requireHyphenBeforeParamDescription.cjs.map +1 -1
  99. package/dist/rules/requireJsdoc.cjs +557 -384
  100. package/dist/rules/requireJsdoc.cjs.map +1 -1
  101. package/dist/rules/requireParam.cjs +526 -336
  102. package/dist/rules/requireParam.cjs.map +1 -1
  103. package/dist/rules/requireParamDescription.cjs +80 -55
  104. package/dist/rules/requireParamDescription.cjs.map +1 -1
  105. package/dist/rules/requireParamName.cjs +50 -32
  106. package/dist/rules/requireParamName.cjs.map +1 -1
  107. package/dist/rules/requireParamType.cjs +80 -55
  108. package/dist/rules/requireParamType.cjs.map +1 -1
  109. package/dist/rules/requireProperty.cjs +42 -31
  110. package/dist/rules/requireProperty.cjs.map +1 -1
  111. package/dist/rules/requirePropertyDescription.cjs +25 -17
  112. package/dist/rules/requirePropertyDescription.cjs.map +1 -1
  113. package/dist/rules/requirePropertyName.cjs +25 -17
  114. package/dist/rules/requirePropertyName.cjs.map +1 -1
  115. package/dist/rules/requirePropertyType.cjs +25 -17
  116. package/dist/rules/requirePropertyType.cjs.map +1 -1
  117. package/dist/rules/requireReturns.cjs +203 -125
  118. package/dist/rules/requireReturns.cjs.map +1 -1
  119. package/dist/rules/requireReturnsCheck.cjs +103 -60
  120. package/dist/rules/requireReturnsCheck.cjs.map +1 -1
  121. package/dist/rules/requireReturnsDescription.cjs +54 -39
  122. package/dist/rules/requireReturnsDescription.cjs.map +1 -1
  123. package/dist/rules/requireReturnsType.cjs +50 -32
  124. package/dist/rules/requireReturnsType.cjs.map +1 -1
  125. package/dist/rules/requireTemplate.cjs +178 -119
  126. package/dist/rules/requireTemplate.cjs.map +1 -1
  127. package/dist/rules/requireThrows.cjs +95 -61
  128. package/dist/rules/requireThrows.cjs.map +1 -1
  129. package/dist/rules/requireYields.cjs +166 -106
  130. package/dist/rules/requireYields.cjs.map +1 -1
  131. package/dist/rules/requireYieldsCheck.cjs +152 -96
  132. package/dist/rules/requireYieldsCheck.cjs.map +1 -1
  133. package/dist/rules/sortTags.cjs +444 -258
  134. package/dist/rules/sortTags.cjs.map +1 -1
  135. package/dist/rules/tagLines.cjs +266 -179
  136. package/dist/rules/tagLines.cjs.map +1 -1
  137. package/dist/rules/textEscaping.cjs +127 -92
  138. package/dist/rules/textEscaping.cjs.map +1 -1
  139. package/dist/rules/validTypes.cjs +265 -252
  140. package/dist/rules/validTypes.cjs.map +1 -1
  141. package/dist/tagNames.cjs +170 -134
  142. package/dist/tagNames.cjs.map +1 -1
  143. package/dist/utils/hasReturnValue.cjs +474 -246
  144. package/dist/utils/hasReturnValue.cjs.map +1 -1
  145. package/package.json +24 -40
  146. package/src/WarnSettings.js +34 -0
  147. package/src/alignTransform.js +358 -0
  148. package/src/defaultTagOrder.js +169 -0
  149. package/src/exportParser.js +978 -0
  150. package/src/getDefaultTagStructureForMode.js +969 -0
  151. package/src/getJsdocProcessorPlugin.js +672 -0
  152. package/src/index.js +530 -0
  153. package/src/iterateJsdoc.js +2518 -0
  154. package/src/jsdocUtils.js +1896 -0
  155. package/src/rules/checkAccess.js +45 -0
  156. package/src/rules/checkAlignment.js +63 -0
  157. package/src/rules/checkExamples.js +589 -0
  158. package/src/rules/checkIndentation.js +75 -0
  159. package/src/rules/checkLineAlignment.js +372 -0
  160. package/src/rules/checkParamNames.js +474 -0
  161. package/src/rules/checkPropertyNames.js +152 -0
  162. package/src/rules/checkSyntax.js +30 -0
  163. package/src/rules/checkTagNames.js +314 -0
  164. package/src/rules/checkTemplateNames.js +204 -0
  165. package/src/rules/checkTypes.js +535 -0
  166. package/src/rules/checkValues.js +248 -0
  167. package/src/rules/convertToJsdocComments.js +398 -0
  168. package/src/rules/emptyTags.js +98 -0
  169. package/src/rules/implementsOnClasses.js +64 -0
  170. package/src/rules/importsAsDependencies.js +133 -0
  171. package/src/rules/informativeDocs.js +189 -0
  172. package/src/rules/linesBeforeBlock.js +134 -0
  173. package/src/rules/matchDescription.js +286 -0
  174. package/src/rules/matchName.js +151 -0
  175. package/src/rules/multilineBlocks.js +493 -0
  176. package/src/rules/noBadBlocks.js +119 -0
  177. package/src/rules/noBlankBlockDescriptions.js +69 -0
  178. package/src/rules/noBlankBlocks.js +53 -0
  179. package/src/rules/noDefaults.js +85 -0
  180. package/src/rules/noMissingSyntax.js +195 -0
  181. package/src/rules/noMultiAsterisks.js +134 -0
  182. package/src/rules/noRestrictedSyntax.js +91 -0
  183. package/src/rules/noTypes.js +93 -0
  184. package/src/rules/noUndefinedTypes.js +543 -0
  185. package/src/rules/requireAsteriskPrefix.js +190 -0
  186. package/src/rules/requireDescription.js +161 -0
  187. package/src/rules/requireDescriptionCompleteSentence.js +335 -0
  188. package/src/rules/requireExample.js +118 -0
  189. package/src/rules/requireFileOverview.js +154 -0
  190. package/src/rules/requireHyphenBeforeParamDescription.js +176 -0
  191. package/src/rules/requireJsdoc.js +743 -0
  192. package/src/rules/requireParam.js +602 -0
  193. package/src/rules/requireParamDescription.js +89 -0
  194. package/src/rules/requireParamName.js +55 -0
  195. package/src/rules/requireParamType.js +89 -0
  196. package/src/rules/requireProperty.js +48 -0
  197. package/src/rules/requirePropertyDescription.js +25 -0
  198. package/src/rules/requirePropertyName.js +25 -0
  199. package/src/rules/requirePropertyType.js +25 -0
  200. package/src/rules/requireReturns.js +238 -0
  201. package/src/rules/requireReturnsCheck.js +145 -0
  202. package/src/rules/requireReturnsDescription.js +59 -0
  203. package/src/rules/requireReturnsType.js +51 -0
  204. package/src/rules/requireTemplate.js +201 -0
  205. package/src/rules/requireThrows.js +111 -0
  206. package/src/rules/requireYields.js +216 -0
  207. package/src/rules/requireYieldsCheck.js +208 -0
  208. package/src/rules/sortTags.js +558 -0
  209. package/src/rules/tagLines.js +359 -0
  210. package/src/rules/textEscaping.js +154 -0
  211. package/src/rules/validTypes.js +401 -0
  212. package/src/tagNames.js +238 -0
  213. package/src/utils/hasReturnValue.js +572 -0
  214. package/dist/WarnSettings.js +0 -20
  215. package/dist/WarnSettings.js.map +0 -1
  216. package/dist/_virtual/rolldown_runtime.cjs +0 -32
  217. package/dist/_virtual/rolldown_runtime.js +0 -11
  218. package/dist/alignTransform.js +0 -241
  219. package/dist/alignTransform.js.map +0 -1
  220. package/dist/defaultTagOrder.js +0 -134
  221. package/dist/defaultTagOrder.js.map +0 -1
  222. package/dist/exportParser.js +0 -518
  223. package/dist/exportParser.js.map +0 -1
  224. package/dist/getDefaultTagStructureForMode.js +0 -188
  225. package/dist/getDefaultTagStructureForMode.js.map +0 -1
  226. package/dist/getJsdocProcessorPlugin.d.cts +0 -70
  227. package/dist/getJsdocProcessorPlugin.d.cts.map +0 -1
  228. package/dist/getJsdocProcessorPlugin.js +0 -383
  229. package/dist/getJsdocProcessorPlugin.js.map +0 -1
  230. package/dist/index.d.cts +0 -22
  231. package/dist/index.d.cts.map +0 -1
  232. package/dist/index.js +0 -425
  233. package/dist/index.js.map +0 -1
  234. package/dist/iterateJsdoc.d.cts +0 -471
  235. package/dist/iterateJsdoc.d.cts.map +0 -1
  236. package/dist/iterateJsdoc.js +0 -1617
  237. package/dist/iterateJsdoc.js.map +0 -1
  238. package/dist/jsdocUtils.js +0 -1123
  239. package/dist/jsdocUtils.js.map +0 -1
  240. package/dist/rules/checkAccess.js +0 -33
  241. package/dist/rules/checkAccess.js.map +0 -1
  242. package/dist/rules/checkAlignment.js +0 -47
  243. package/dist/rules/checkAlignment.js.map +0 -1
  244. package/dist/rules/checkExamples.js +0 -348
  245. package/dist/rules/checkExamples.js.map +0 -1
  246. package/dist/rules/checkIndentation.js +0 -59
  247. package/dist/rules/checkIndentation.js.map +0 -1
  248. package/dist/rules/checkLineAlignment.js +0 -229
  249. package/dist/rules/checkLineAlignment.js.map +0 -1
  250. package/dist/rules/checkParamNames.js +0 -237
  251. package/dist/rules/checkParamNames.js.map +0 -1
  252. package/dist/rules/checkPropertyNames.js +0 -88
  253. package/dist/rules/checkPropertyNames.js.map +0 -1
  254. package/dist/rules/checkSyntax.js +0 -25
  255. package/dist/rules/checkSyntax.js.map +0 -1
  256. package/dist/rules/checkTagNames.js +0 -191
  257. package/dist/rules/checkTagNames.js.map +0 -1
  258. package/dist/rules/checkTemplateNames.js +0 -124
  259. package/dist/rules/checkTemplateNames.js.map +0 -1
  260. package/dist/rules/checkTypes.js +0 -299
  261. package/dist/rules/checkTypes.js.map +0 -1
  262. package/dist/rules/checkValues.js +0 -103
  263. package/dist/rules/checkValues.js.map +0 -1
  264. package/dist/rules/convertToJsdocComments.js +0 -231
  265. package/dist/rules/convertToJsdocComments.js.map +0 -1
  266. package/dist/rules/emptyTags.js +0 -67
  267. package/dist/rules/emptyTags.js.map +0 -1
  268. package/dist/rules/implementsOnClasses.js +0 -40
  269. package/dist/rules/implementsOnClasses.js.map +0 -1
  270. package/dist/rules/importsAsDependencies.js +0 -68
  271. package/dist/rules/importsAsDependencies.js.map +0 -1
  272. package/dist/rules/informativeDocs.js +0 -110
  273. package/dist/rules/informativeDocs.js.map +0 -1
  274. package/dist/rules/linesBeforeBlock.js +0 -75
  275. package/dist/rules/linesBeforeBlock.js.map +0 -1
  276. package/dist/rules/matchDescription.js +0 -167
  277. package/dist/rules/matchDescription.js.map +0 -1
  278. package/dist/rules/matchName.js +0 -77
  279. package/dist/rules/matchName.js.map +0 -1
  280. package/dist/rules/multilineBlocks.js +0 -245
  281. package/dist/rules/multilineBlocks.js.map +0 -1
  282. package/dist/rules/noBadBlocks.js +0 -68
  283. package/dist/rules/noBadBlocks.js.map +0 -1
  284. package/dist/rules/noBlankBlockDescriptions.js +0 -41
  285. package/dist/rules/noBlankBlockDescriptions.js.map +0 -1
  286. package/dist/rules/noBlankBlocks.js +0 -30
  287. package/dist/rules/noBlankBlocks.js.map +0 -1
  288. package/dist/rules/noDefaults.js +0 -56
  289. package/dist/rules/noDefaults.js.map +0 -1
  290. package/dist/rules/noMissingSyntax.js +0 -126
  291. package/dist/rules/noMissingSyntax.js.map +0 -1
  292. package/dist/rules/noMultiAsterisks.js +0 -58
  293. package/dist/rules/noMultiAsterisks.js.map +0 -1
  294. package/dist/rules/noRestrictedSyntax.js +0 -49
  295. package/dist/rules/noRestrictedSyntax.js.map +0 -1
  296. package/dist/rules/noTypes.js +0 -65
  297. package/dist/rules/noTypes.js.map +0 -1
  298. package/dist/rules/noUndefinedTypes.js +0 -303
  299. package/dist/rules/noUndefinedTypes.js.map +0 -1
  300. package/dist/rules/requireAsteriskPrefix.js +0 -112
  301. package/dist/rules/requireAsteriskPrefix.js.map +0 -1
  302. package/dist/rules/requireDescription.js +0 -95
  303. package/dist/rules/requireDescription.js.map +0 -1
  304. package/dist/rules/requireDescriptionCompleteSentence.js +0 -220
  305. package/dist/rules/requireDescriptionCompleteSentence.js.map +0 -1
  306. package/dist/rules/requireExample.js +0 -77
  307. package/dist/rules/requireExample.js.map +0 -1
  308. package/dist/rules/requireFileOverview.js +0 -81
  309. package/dist/rules/requireFileOverview.js.map +0 -1
  310. package/dist/rules/requireHyphenBeforeParamDescription.js +0 -89
  311. package/dist/rules/requireHyphenBeforeParamDescription.js.map +0 -1
  312. package/dist/rules/requireJsdoc.js +0 -404
  313. package/dist/rules/requireJsdoc.js.map +0 -1
  314. package/dist/rules/requireParam.js +0 -344
  315. package/dist/rules/requireParam.js.map +0 -1
  316. package/dist/rules/requireParamDescription.js +0 -59
  317. package/dist/rules/requireParamDescription.js.map +0 -1
  318. package/dist/rules/requireParamName.js +0 -36
  319. package/dist/rules/requireParamName.js.map +0 -1
  320. package/dist/rules/requireParamType.js +0 -59
  321. package/dist/rules/requireParamType.js.map +0 -1
  322. package/dist/rules/requireProperty.js +0 -35
  323. package/dist/rules/requireProperty.js.map +0 -1
  324. package/dist/rules/requirePropertyDescription.js +0 -21
  325. package/dist/rules/requirePropertyDescription.js.map +0 -1
  326. package/dist/rules/requirePropertyName.js +0 -21
  327. package/dist/rules/requirePropertyName.js.map +0 -1
  328. package/dist/rules/requirePropertyType.js +0 -21
  329. package/dist/rules/requirePropertyType.js.map +0 -1
  330. package/dist/rules/requireReturns.js +0 -131
  331. package/dist/rules/requireReturns.js.map +0 -1
  332. package/dist/rules/requireReturnsCheck.js +0 -66
  333. package/dist/rules/requireReturnsCheck.js.map +0 -1
  334. package/dist/rules/requireReturnsDescription.js +0 -43
  335. package/dist/rules/requireReturnsDescription.js.map +0 -1
  336. package/dist/rules/requireReturnsType.js +0 -36
  337. package/dist/rules/requireReturnsType.js.map +0 -1
  338. package/dist/rules/requireTemplate.js +0 -122
  339. package/dist/rules/requireTemplate.js.map +0 -1
  340. package/dist/rules/requireThrows.js +0 -67
  341. package/dist/rules/requireThrows.js.map +0 -1
  342. package/dist/rules/requireYields.js +0 -115
  343. package/dist/rules/requireYields.js.map +0 -1
  344. package/dist/rules/requireYieldsCheck.js +0 -105
  345. package/dist/rules/requireYieldsCheck.js.map +0 -1
  346. package/dist/rules/sortTags.js +0 -262
  347. package/dist/rules/sortTags.js.map +0 -1
  348. package/dist/rules/tagLines.js +0 -183
  349. package/dist/rules/tagLines.js.map +0 -1
  350. package/dist/rules/textEscaping.js +0 -102
  351. package/dist/rules/textEscaping.js.map +0 -1
  352. package/dist/rules/validTypes.js +0 -259
  353. package/dist/rules/validTypes.js.map +0 -1
  354. package/dist/tagNames.js +0 -144
  355. package/dist/tagNames.js.map +0 -1
  356. package/dist/utils/hasReturnValue.js +0 -265
  357. package/dist/utils/hasReturnValue.js.map +0 -1
@@ -1,189 +1,293 @@
1
+ "use strict";
1
2
 
2
- //#region src/getDefaultTagStructureForMode.js
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
3
7
  /**
4
- * @typedef {Map<string, Map<string, (string|boolean)>>} TagStructure
5
- */
8
+ * @typedef {Map<string, Map<string, (string|boolean)>>} TagStructure
9
+ */
6
10
  /**
7
- * @param {import('./jsdocUtils.js').ParserMode} mode
8
- * @returns {TagStructure}
9
- */
10
- const getDefaultTagStructureForMode = (mode) => {
11
- const isJsdoc = mode === "jsdoc";
12
- const isClosure = mode === "closure";
13
- const isTypescript = mode === "typescript";
14
- const isPermissive = mode === "permissive";
15
- const isJsdocOrPermissive = isJsdoc || isPermissive;
16
- const isJsdocOrTypescript = isJsdoc || isTypescript;
17
- const isTypescriptOrClosure = isTypescript || isClosure;
18
- const isClosureOrPermissive = isClosure || isPermissive;
19
- const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;
20
- /**
21
- * @type {TagStructure}
22
- */
23
- return new Map([
24
- ["alias", new Map([["namepathRole", "namepath-defining"], ["typeOrNameRequired", true]])],
25
- ["arg", new Map([
26
- ["namepathRole", "namepath-defining"],
27
- ["nameRequired", true],
28
- ["typeAllowed", true]
29
- ])],
30
- ["argument", new Map([
31
- ["namepathRole", "namepath-defining"],
32
- ["nameRequired", true],
33
- ["typeAllowed", true]
34
- ])],
35
- ["augments", new Map([
36
- ["namepathRole", "namepath-referencing"],
37
- ["typeAllowed", true],
38
- ["typeOrNameRequired", true]
39
- ])],
40
- ["borrows", new Map([["namepathRole", "namepath-referencing"], ["typeOrNameRequired", true]])],
41
- ["callback", new Map([["namepathRole", "namepath-defining"], ["nameRequired", true]])],
42
- ["class", new Map([
43
- ["nameAllowed", true],
44
- ["namepathRole", "namepath-defining"],
45
- ["typeAllowed", true]
46
- ])],
47
- ["const", new Map([["namepathRole", "namepath-defining"], ["typeAllowed", true]])],
48
- ["constant", new Map([["namepathRole", "namepath-defining"], ["typeAllowed", true]])],
49
- ["constructor", new Map([["namepathRole", "namepath-defining"], ["typeAllowed", true]])],
50
- ["constructs", new Map([
51
- ["namepathRole", "namepath-defining"],
52
- ["nameRequired", false],
53
- ["typeAllowed", false]
54
- ])],
55
- ["define", new Map([["typeRequired", isClosure]])],
56
- ["emits", new Map([
57
- ["namepathRole", "namepath-referencing"],
58
- ["nameRequired", true],
59
- ["typeAllowed", false]
60
- ])],
61
- ["enum", new Map([["typeAllowed", true]])],
62
- ["event", new Map([["namepathRole", "namepath-defining"], ["nameRequired", true]])],
63
- ["exception", new Map([["typeAllowed", true]])],
64
- ["export", new Map([["typeAllowed", isClosureOrPermissive]])],
65
- ["exports", new Map([
66
- ["namepathRole", "namepath-defining"],
67
- ["nameRequired", isJsdoc],
68
- ["typeAllowed", isClosureOrPermissive]
69
- ])],
70
- ["extends", new Map([
71
- ["namepathRole", "namepath-referencing"],
72
- ["nameRequired", isJsdoc],
73
- ["typeAllowed", isTypescriptOrClosure || isPermissive],
74
- ["typeOrNameRequired", isTypescriptOrClosure || isPermissive]
75
- ])],
76
- ["external", new Map([
77
- ["namepathRole", "namepath-defining"],
78
- ["nameRequired", true],
79
- ["typeAllowed", false]
80
- ])],
81
- ["fires", new Map([
82
- ["namepathRole", "namepath-referencing"],
83
- ["nameRequired", true],
84
- ["typeAllowed", false]
85
- ])],
86
- ["func", new Map([["namepathRole", "namepath-defining"]])],
87
- ["function", new Map([
88
- ["namepathRole", "namepath-defining"],
89
- ["nameRequired", false],
90
- ["typeAllowed", false]
91
- ])],
92
- ["host", new Map([
93
- ["namepathRole", "namepath-defining"],
94
- ["nameRequired", true],
95
- ["typeAllowed", false]
96
- ])],
97
- ["implements", new Map([["typeRequired", true]])],
98
- ["interface", new Map([
99
- ["nameAllowed", isClosure],
100
- ["namepathRole", isJsdocTypescriptOrPermissive ? "namepath-defining" : false],
101
- ["typeAllowed", false]
102
- ])],
103
- ["internal", new Map([["nameAllowed", false], ["namepathRole", false]])],
104
- ["lends", new Map([["namepathRole", "namepath-referencing"], ["typeOrNameRequired", true]])],
105
- ["link", new Map([["namepathRole", "namepath-or-url-referencing"]])],
106
- ["linkcode", new Map([["namepathRole", "namepath-or-url-referencing"]])],
107
- ["linkplain", new Map([["namepathRole", "namepath-or-url-referencing"]])],
108
- ["listens", new Map([
109
- ["namepathRole", "namepath-referencing"],
110
- ["nameRequired", true],
111
- ["typeAllowed", false]
112
- ])],
113
- ["member", new Map([["namepathRole", "namepath-defining"], ["typeAllowed", true]])],
114
- ["memberof!", new Map([["namepathRole", "namepath-referencing"], ["typeOrNameRequired", true]])],
115
- ["memberof", new Map([["namepathRole", "namepath-referencing"], ["typeOrNameRequired", true]])],
116
- ["method", new Map([["namepathRole", "namepath-defining"]])],
117
- ["mixes", new Map([["namepathRole", "namepath-referencing"], ["typeOrNameRequired", true]])],
118
- ["mixin", new Map([
119
- ["namepathRole", "namepath-defining"],
120
- ["nameRequired", false],
121
- ["typeAllowed", false]
122
- ])],
123
- ["modifies", new Map([["typeAllowed", true]])],
124
- ["module", new Map([["namepathRole", isJsdoc ? "namepath-defining" : "text"], ["typeAllowed", true]])],
125
- ["name", new Map([
126
- ["namepathRole", "namepath-defining"],
127
- ["nameRequired", true],
128
- ["typeOrNameRequired", true]
129
- ])],
130
- ["namespace", new Map([["namepathRole", "namepath-defining"], ["typeAllowed", true]])],
131
- ["package", new Map([["typeAllowed", isClosureOrPermissive]])],
132
- ["param", new Map([
133
- ["namepathRole", "namepath-defining"],
134
- ["nameRequired", true],
135
- ["typeAllowed", true]
136
- ])],
137
- ["private", new Map([["typeAllowed", isClosureOrPermissive]])],
138
- ["prop", new Map([
139
- ["namepathRole", "namepath-defining"],
140
- ["nameRequired", true],
141
- ["typeAllowed", true]
142
- ])],
143
- ["property", new Map([
144
- ["namepathRole", "namepath-defining"],
145
- ["nameRequired", true],
146
- ["typeAllowed", true]
147
- ])],
148
- ["protected", new Map([["typeAllowed", isClosureOrPermissive]])],
149
- ["public", new Map([["typeAllowed", isClosureOrPermissive]])],
150
- ["requires", new Map([
151
- ["namepathRole", "namepath-referencing"],
152
- ["nameRequired", true],
153
- ["typeAllowed", false]
154
- ])],
155
- ["return", new Map([["typeAllowed", true]])],
156
- ["returns", new Map([["typeAllowed", true]])],
157
- ["satisfies", new Map([["typeRequired", true]])],
158
- ["see", new Map([["namepathRole", "text"]])],
159
- ["static", new Map([["typeAllowed", isClosureOrPermissive]])],
160
- ["suppress", new Map([["namepathRole", !isClosure], ["typeRequired", isClosure]])],
161
- ["template", new Map([
162
- ["namepathRole", isJsdoc ? "text" : "namepath-referencing"],
163
- ["nameRequired", !isJsdoc],
164
- ["typeAllowed", isTypescriptOrClosure || isPermissive]
165
- ])],
166
- ["this", new Map([
167
- ["namepathRole", isJsdoc ? "namepath-referencing" : false],
168
- ["typeOrNameRequired", isJsdoc],
169
- ["typeRequired", isTypescriptOrClosure]
170
- ])],
171
- ["throws", new Map([["typeAllowed", true]])],
172
- ["tutorial", new Map([["nameRequired", true], ["typeAllowed", false]])],
173
- ["type", new Map([["typeRequired", true]])],
174
- ["typedef", new Map([
175
- ["namepathRole", "namepath-defining"],
176
- ["nameRequired", isJsdocOrPermissive],
177
- ["typeAllowed", true],
178
- ["typeOrNameRequired", !isTypescript]
179
- ])],
180
- ["var", new Map([["namepathRole", "namepath-defining"], ["typeAllowed", true]])],
181
- ["yield", new Map([["typeAllowed", true]])],
182
- ["yields", new Map([["typeAllowed", true]])]
183
- ]);
184
- };
185
- var getDefaultTagStructureForMode_default = getDefaultTagStructureForMode;
11
+ * @param {import('./jsdocUtils.js').ParserMode} mode
12
+ * @returns {TagStructure}
13
+ */
14
+ const getDefaultTagStructureForMode = mode => {
15
+ const isJsdoc = mode === 'jsdoc';
16
+ const isClosure = mode === 'closure';
17
+ const isTypescript = mode === 'typescript';
18
+ const isPermissive = mode === 'permissive';
19
+ const isJsdocOrPermissive = isJsdoc || isPermissive;
20
+ const isJsdocOrTypescript = isJsdoc || isTypescript;
21
+ const isTypescriptOrClosure = isTypescript || isClosure;
22
+ const isClosureOrPermissive = isClosure || isPermissive;
23
+ const isJsdocTypescriptOrPermissive = isJsdocOrTypescript || isPermissive;
24
+
25
+ // Properties:
26
+ // `namepathRole` - 'namepath-referencing'|'namepath-defining'|'namepath-or-url-referencing'|'text'|false
27
+ // `typeAllowed` - boolean
28
+ // `nameRequired` - boolean
29
+ // `typeRequired` - boolean
30
+ // `typeOrNameRequired` - boolean
31
+
32
+ // All of `typeAllowed` have a signature with "type" except for
33
+ // `augments`/`extends` ("namepath")
34
+ // `param`/`arg`/`argument` (no signature)
35
+ // `property`/`prop` (no signature)
36
+ // `modifies` (undocumented)
37
+
38
+ // None of the `namepathRole: 'namepath-defining'` show as having curly
39
+ // brackets for their name/namepath
40
+
41
+ // Among `namepath-defining` and `namepath-referencing`, these do not seem
42
+ // to allow curly brackets in their doc signature or examples (`modifies`
43
+ // references namepaths within its type brackets and `param` is
44
+ // name-defining but not namepath-defining, so not part of these groups)
186
45
 
187
- //#endregion
188
- exports.default = getDefaultTagStructureForMode_default;
46
+ // Todo: Should support special processing for "name" as distinct from
47
+ // "namepath" (e.g., param can't define a namepath)
48
+
49
+ // Todo: Should support a `tutorialID` type (for `@tutorial` block and
50
+ // inline)
51
+
52
+ /**
53
+ * @type {TagStructure}
54
+ */
55
+ return new Map([['alias', new Map(/** @type {[string, string|boolean][]} */[
56
+ // Signature seems to require a "namepath" (and no counter-examples)
57
+ ['namepathRole', 'namepath-defining'],
58
+ // "namepath"
59
+ ['typeOrNameRequired', true]])], ['arg', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
60
+ // See `param`
61
+ ['nameRequired', true],
62
+ // Has no formal signature in the docs but shows curly brackets
63
+ // in the examples
64
+ ['typeAllowed', true]])], ['argument', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
65
+ // See `param`
66
+ ['nameRequired', true],
67
+ // Has no formal signature in the docs but shows curly brackets
68
+ // in the examples
69
+ ['typeAllowed', true]])], ['augments', new Map(/** @type {[string, string|boolean][]} */[
70
+ // Signature seems to require a "namepath" (and no counter-examples)
71
+ ['namepathRole', 'namepath-referencing'],
72
+ // Does not show curly brackets in either the signature or examples
73
+ ['typeAllowed', true],
74
+ // "namepath"
75
+ ['typeOrNameRequired', true]])], ['borrows', new Map(/** @type {[string, string|boolean][]} */[
76
+ // `borrows` has a different format, however, so needs special parsing;
77
+ // seems to require both, and as "namepath"'s
78
+ ['namepathRole', 'namepath-referencing'],
79
+ // "namepath"
80
+ ['typeOrNameRequired', true]])], ['callback', new Map(/** @type {[string, string|boolean][]} */[
81
+ // Seems to require a "namepath" in the signature (with no
82
+ // counter-examples); TypeScript does not enforce but seems
83
+ // problematic as not attached so presumably not useable without it
84
+ ['namepathRole', 'namepath-defining'],
85
+ // "namepath"
86
+ ['nameRequired', true]])], ['class', new Map(/** @type {[string, string|boolean][]} */[
87
+ // Not in use, but should be this value if using to power `empty-tags`
88
+ ['nameAllowed', true],
89
+ // Allows for "name"'s in signature, but indicated as optional
90
+ ['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['const', new Map(/** @type {[string, string|boolean][]} */[
91
+ // Allows for "name"'s in signature, but indicated as optional
92
+ ['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constant', new Map(/** @type {[string, string|boolean][]} */[
93
+ // Allows for "name"'s in signature, but indicated as optional
94
+ ['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constructor', new Map(/** @type {[string, string|boolean][]} */[
95
+ // Allows for "name"'s in signature, but indicated as optional
96
+ ['namepathRole', 'namepath-defining'], ['typeAllowed', true]])], ['constructs', new Map(/** @type {[string, string|boolean][]} */[
97
+ // Allows for "name"'s in signature, but indicated as optional
98
+ ['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['define', new Map(/** @type {[string, string|boolean][]} */[['typeRequired', isClosure]])], ['emits', new Map(/** @type {[string, string|boolean][]} */[
99
+ // Signature seems to require a "name" (of an event) and no counter-examples
100
+ ['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['enum', new Map(/** @type {[string, string|boolean][]} */[
101
+ // Has example showing curly brackets but not in doc signature
102
+ ['typeAllowed', true]])], ['event', new Map(/** @type {[string, string|boolean][]} */[
103
+ // Appears to require a "name" in its signature, albeit somewhat
104
+ // different from other "name"'s (including as described
105
+ // at https://jsdoc.app/about-namepaths.html )
106
+ ['namepathRole', 'namepath-defining'],
107
+ // The doc signature of `event` seems to require a "name"
108
+ ['nameRequired', true]])], ['exception', new Map(/** @type {[string, string|boolean][]} */[
109
+ // Shows curly brackets in the signature and in the examples
110
+ ['typeAllowed', true]])],
111
+ // Closure
112
+ ['export', new Map(/** @type {[string, string|boolean][]} */[['typeAllowed', isClosureOrPermissive]])], ['exports', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'], ['nameRequired', isJsdoc], ['typeAllowed', isClosureOrPermissive]])], ['extends', new Map(/** @type {[string, string|boolean][]} */[
113
+ // Signature seems to require a "namepath" (and no counter-examples)
114
+ ['namepathRole', 'namepath-referencing'], ['nameRequired', isJsdoc],
115
+ // Does not show curly brackets in either the signature or examples
116
+ ['typeAllowed', isTypescriptOrClosure || isPermissive],
117
+ // "namepath"
118
+ ['typeOrNameRequired', isTypescriptOrClosure || isPermissive]])], ['external', new Map(/** @type {[string, string|boolean][]} */[
119
+ // Appears to require a "name" in its signature, albeit somewhat
120
+ // different from other "name"'s (including as described
121
+ // at https://jsdoc.app/about-namepaths.html )
122
+ ['namepathRole', 'namepath-defining'],
123
+ // "name" (and a special syntax for the `external` name)
124
+ ['nameRequired', true], ['typeAllowed', false]])], ['fires', new Map(/** @type {[string, string|boolean][]} */[
125
+ // Signature seems to require a "name" (of an event) and no
126
+ // counter-examples
127
+ ['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['func', new Map(/** @type {[string, string|boolean][]} */[
128
+ // Allows for "name"'s in signature, but indicated as optional
129
+ ['namepathRole', 'namepath-defining']])], ['function', new Map(/** @type {[string, string|boolean][]} */[
130
+ // Allows for "name"'s in signature, but indicated as optional
131
+ ['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['host', new Map(/** @type {[string, string|boolean][]} */[
132
+ // Appears to require a "name" in its signature, albeit somewhat
133
+ // different from other "name"'s (including as described
134
+ // at https://jsdoc.app/about-namepaths.html )
135
+ ['namepathRole', 'namepath-defining'],
136
+ // See `external`
137
+ ['nameRequired', true], ['typeAllowed', false]])], ['implements', new Map(/** @type {[string, string|boolean][]} */[
138
+ // Shows curly brackets in the doc signature and examples
139
+ // "typeExpression"
140
+ ['typeRequired', true]])], ['interface', new Map(/** @type {[string, string|boolean][]} */[
141
+ // Not in use, but should be this value if using to power `empty-tags`
142
+ ['nameAllowed', isClosure],
143
+ // Allows for "name" in signature, but indicates as optional
144
+ ['namepathRole', isJsdocTypescriptOrPermissive ? 'namepath-defining' : false], ['typeAllowed', false]])], ['internal', new Map(/** @type {[string, string|boolean][]} */[
145
+ // Not in use, but should be this value if using to power `empty-tags`
146
+ ['nameAllowed', false],
147
+ // https://www.typescriptlang.org/tsconfig/#stripInternal
148
+ ['namepathRole', false]])], ['lends', new Map(/** @type {[string, string|boolean][]} */[
149
+ // Signature seems to require a "namepath" (and no counter-examples)
150
+ ['namepathRole', 'namepath-referencing'],
151
+ // "namepath"
152
+ ['typeOrNameRequired', true]])], ['link', new Map(/** @type {[string, string|boolean][]} */[
153
+ // Signature seems to require a namepath OR URL and might be checked as such.
154
+ ['namepathRole', 'namepath-or-url-referencing']])], ['linkcode', new Map(/** @type {[string, string|boolean][]} */[
155
+ // Synonym for "link"
156
+ // Signature seems to require a namepath OR URL and might be checked as such.
157
+ ['namepathRole', 'namepath-or-url-referencing']])], ['linkplain', new Map(/** @type {[string, string|boolean][]} */[
158
+ // Synonym for "link"
159
+ // Signature seems to require a namepath OR URL and might be checked as such.
160
+ ['namepathRole', 'namepath-or-url-referencing']])], ['listens', new Map(/** @type {[string, string|boolean][]} */[
161
+ // Signature seems to require a "name" (of an event) and no
162
+ // counter-examples
163
+ ['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['member', new Map(/** @type {[string, string|boolean][]} */[
164
+ // Allows for "name"'s in signature, but indicated as optional
165
+ ['namepathRole', 'namepath-defining'],
166
+ // Has example showing curly brackets but not in doc signature
167
+ ['typeAllowed', true]])], ['memberof!', new Map(/** @type {[string, string|boolean][]} */[
168
+ // Signature seems to require a "namepath" (and no counter-examples),
169
+ // though it allows an incomplete namepath ending with connecting symbol
170
+ ['namepathRole', 'namepath-referencing'],
171
+ // "namepath"
172
+ ['typeOrNameRequired', true]])], ['memberof', new Map(/** @type {[string, string|boolean][]} */[
173
+ // Signature seems to require a "namepath" (and no counter-examples),
174
+ // though it allows an incomplete namepath ending with connecting symbol
175
+ ['namepathRole', 'namepath-referencing'],
176
+ // "namepath"
177
+ ['typeOrNameRequired', true]])], ['method', new Map(/** @type {[string, string|boolean][]} */[
178
+ // Allows for "name"'s in signature, but indicated as optional
179
+ ['namepathRole', 'namepath-defining']])], ['mixes', new Map(/** @type {[string, string|boolean][]} */[
180
+ // Signature seems to require a "OtherObjectPath" with no
181
+ // counter-examples
182
+ ['namepathRole', 'namepath-referencing'],
183
+ // "OtherObjectPath"
184
+ ['typeOrNameRequired', true]])], ['mixin', new Map(/** @type {[string, string|boolean][]} */[
185
+ // Allows for "name"'s in signature, but indicated as optional
186
+ ['namepathRole', 'namepath-defining'], ['nameRequired', false], ['typeAllowed', false]])], ['modifies', new Map(/** @type {[string, string|boolean][]} */[
187
+ // Has no documentation, but test example has curly brackets, and
188
+ // "name" would be suggested rather than "namepath" based on example;
189
+ // not sure if name is required
190
+ ['typeAllowed', true]])], ['module', new Map(/** @type {[string, string|boolean][]} */[
191
+ // Optional "name" and no curly brackets
192
+ // this block impacts `no-undefined-types` and `valid-types` (search for
193
+ // "isNamepathDefiningTag|tagMightHaveNamepath|tagMightHaveEitherTypeOrNamePosition")
194
+ ['namepathRole', isJsdoc ? 'namepath-defining' : 'text'],
195
+ // Shows the signature with curly brackets but not in the example
196
+ ['typeAllowed', true]])], ['name', new Map(/** @type {[string, string|boolean][]} */[
197
+ // Seems to require a "namepath" in the signature (with no
198
+ // counter-examples)
199
+ ['namepathRole', 'namepath-defining'],
200
+ // "namepath"
201
+ ['nameRequired', true],
202
+ // "namepath"
203
+ ['typeOrNameRequired', true]])], ['namespace', new Map(/** @type {[string, string|boolean][]} */[
204
+ // Allows for "name"'s in signature, but indicated as optional
205
+ ['namepathRole', 'namepath-defining'],
206
+ // Shows the signature with curly brackets but not in the example
207
+ ['typeAllowed', true]])], ['package', new Map(/** @type {[string, string|boolean][]} */[
208
+ // Shows the signature with curly brackets but not in the example
209
+ // "typeExpression"
210
+ ['typeAllowed', isClosureOrPermissive]])], ['param', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
211
+ // Though no signature provided requiring, per
212
+ // https://jsdoc.app/tags-param.html:
213
+ // "The @param tag requires you to specify the name of the parameter you
214
+ // are documenting."
215
+ ['nameRequired', true],
216
+ // Has no formal signature in the docs but shows curly brackets
217
+ // in the examples
218
+ ['typeAllowed', true]])], ['private', new Map(/** @type {[string, string|boolean][]} */[
219
+ // Shows the signature with curly brackets but not in the example
220
+ // "typeExpression"
221
+ ['typeAllowed', isClosureOrPermissive]])], ['prop', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
222
+ // See `property`
223
+ ['nameRequired', true],
224
+ // Has no formal signature in the docs but shows curly brackets
225
+ // in the examples
226
+ ['typeAllowed', true]])], ['property', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', 'namepath-defining'],
227
+ // No docs indicate required, but since parallel to `param`, we treat as
228
+ // such:
229
+ ['nameRequired', true],
230
+ // Has no formal signature in the docs but shows curly brackets
231
+ // in the examples
232
+ ['typeAllowed', true]])], ['protected', new Map(/** @type {[string, string|boolean][]} */[
233
+ // Shows the signature with curly brackets but not in the example
234
+ // "typeExpression"
235
+ ['typeAllowed', isClosureOrPermissive]])], ['public', new Map(/** @type {[string, string|boolean][]} */[
236
+ // Does not show a signature nor show curly brackets in the example
237
+ ['typeAllowed', isClosureOrPermissive]])], ['requires', new Map(/** @type {[string, string|boolean][]} */[
238
+ // <someModuleName>
239
+ ['namepathRole', 'namepath-referencing'], ['nameRequired', true], ['typeAllowed', false]])], ['return', new Map(/** @type {[string, string|boolean][]} */[
240
+ // Shows curly brackets in the signature and in the examples
241
+ ['typeAllowed', true]])], ['returns', new Map(/** @type {[string, string|boolean][]} */[
242
+ // Shows curly brackets in the signature and in the examples
243
+ ['typeAllowed', true]])], ['satisfies', new Map(/** @type {[string, string|boolean][]} */[
244
+ // Shows curly brackets in the doc signature and examples
245
+ ['typeRequired', true]])], ['see', new Map(/** @type {[string, string|boolean][]} */[
246
+ // Signature allows for "namepath" or text, so user must configure to
247
+ // 'namepath-referencing' to enforce checks
248
+ ['namepathRole', 'text']])], ['static', new Map(/** @type {[string, string|boolean][]} */[
249
+ // Does not show a signature nor show curly brackets in the example
250
+ ['typeAllowed', isClosureOrPermissive]])], ['suppress', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', !isClosure], ['typeRequired', isClosure]])], ['template', new Map(/** @type {[string, string|boolean][]} */[['namepathRole', isJsdoc ? 'text' : 'namepath-referencing'], ['nameRequired', !isJsdoc],
251
+ // Though defines `namepathRole: 'namepath-defining'` in a sense, it is
252
+ // not parseable in the same way for template (e.g., allowing commas),
253
+ // so not adding
254
+ ['typeAllowed', isTypescriptOrClosure || isPermissive]])], ['this', new Map(/** @type {[string, string|boolean][]} */[
255
+ // Signature seems to require a "namepath" (and no counter-examples)
256
+ // Not used with namepath in Closure/TypeScript, however
257
+ ['namepathRole', isJsdoc ? 'namepath-referencing' : false],
258
+ // namepath
259
+ ['typeOrNameRequired', isJsdoc], ['typeRequired', isTypescriptOrClosure]])], ['throws', new Map(/** @type {[string, string|boolean][]} */[
260
+ // Shows curly brackets in the signature and in the examples
261
+ ['typeAllowed', true]])], ['tutorial', new Map(/** @type {[string, string|boolean][]} */[
262
+ // (a tutorial ID)
263
+ ['nameRequired', true], ['typeAllowed', false]])], ['type', new Map(/** @type {[string, string|boolean][]} */[
264
+ // Shows curly brackets in the doc signature and examples
265
+ // "typeName"
266
+ ['typeRequired', true]])], ['typedef', new Map(/** @type {[string, string|boolean][]} */[
267
+ // Seems to require a "namepath" in the signature (with no
268
+ // counter-examples)
269
+ ['namepathRole', 'namepath-defining'],
270
+ // TypeScript may allow it to be dropped if followed by @property or @member;
271
+ // also shown as missing in Closure
272
+ // "namepath"
273
+ ['nameRequired', isJsdocOrPermissive],
274
+ // Is not `typeRequired` for TypeScript because it gives an error:
275
+ // JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags.
276
+
277
+ // Has example showing curly brackets but not in doc signature
278
+ ['typeAllowed', true],
279
+ // TypeScript may allow it to be dropped if followed by @property or @member
280
+ // "namepath"
281
+ ['typeOrNameRequired', !isTypescript]])], ['var', new Map(/** @type {[string, string|boolean][]} */[
282
+ // Allows for "name"'s in signature, but indicated as optional
283
+ ['namepathRole', 'namepath-defining'],
284
+ // Has example showing curly brackets but not in doc signature
285
+ ['typeAllowed', true]])], ['yield', new Map(/** @type {[string, string|boolean][]} */[
286
+ // Shows curly brackets in the signature and in the examples
287
+ ['typeAllowed', true]])], ['yields', new Map(/** @type {[string, string|boolean][]} */[
288
+ // Shows curly brackets in the signature and in the examples
289
+ ['typeAllowed', true]])]]);
290
+ };
291
+ var _default = exports.default = getDefaultTagStructureForMode;
292
+ module.exports = exports.default;
189
293
  //# sourceMappingURL=getDefaultTagStructureForMode.cjs.map