typedoc 0.28.18 → 0.28.20

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 (397) hide show
  1. package/README.md +12 -13
  2. package/bin/typedoc +1 -1
  3. package/dist/browser-locales/fr.d.ts +2 -0
  4. package/dist/browser-locales/fr.js +62 -0
  5. package/dist/browser-utils.js +29 -2
  6. package/dist/cli.js +111 -0
  7. package/dist/index.js +17888 -44
  8. package/dist/models.js +3736 -0
  9. package/dist/node-utils.js +7018 -0
  10. package/dist/serialization.js +430 -0
  11. package/dist/{lib → types}/application-events.d.ts +2 -0
  12. package/dist/{lib → types}/application.d.ts +51 -8
  13. package/dist/{lib → types}/converter/comments/declarationReferenceResolver.d.ts +1 -1
  14. package/dist/{lib → types}/converter/comments/discovery.d.ts +3 -3
  15. package/dist/{lib → types}/converter/comments/index.d.ts +4 -4
  16. package/dist/{lib → types}/converter/comments/lexer.d.ts +1 -1
  17. package/dist/{lib → types}/converter/comments/linkResolver.d.ts +1 -1
  18. package/dist/{lib → types}/converter/comments/parser.d.ts +3 -4
  19. package/dist/{lib → types}/converter/comments/textParser.d.ts +8 -2
  20. package/dist/{lib → types}/converter/components.d.ts +1 -1
  21. package/dist/{lib → types}/converter/context.d.ts +2 -2
  22. package/dist/{lib → types}/converter/converter.d.ts +6 -8
  23. package/dist/{lib → types}/converter/factories/signature.d.ts +1 -1
  24. package/dist/{lib → types}/converter/index.d.ts +1 -0
  25. package/dist/{lib → types}/converter/plugins/CategoryPlugin.d.ts +2 -2
  26. package/dist/{lib → types}/converter/plugins/GroupPlugin.d.ts +2 -3
  27. package/dist/{lib → types}/converter/plugins/IncludePlugin.d.ts +1 -1
  28. package/dist/{lib → types}/converter/plugins/InheritDocPlugin.d.ts +1 -1
  29. package/dist/{lib → types}/converter/plugins/LinkResolverPlugin.d.ts +3 -3
  30. package/dist/{lib → types}/converter/plugins/SourcePlugin.d.ts +1 -2
  31. package/dist/{lib → types}/converter/plugins/TypePlugin.d.ts +1 -1
  32. package/dist/{lib → types}/converter/types.d.ts +1 -1
  33. package/dist/{lib/converter/utils → types/converter/utilities}/reflections.d.ts +1 -1
  34. package/dist/{lib/converter/utils → types/converter/utilities}/repository.d.ts +14 -13
  35. package/dist/{index.d.ts → types/index.d.ts} +15 -16
  36. package/dist/{lib → types}/internationalization/internationalization.d.ts +0 -8
  37. package/dist/types/internationalization/locale-utils.d.ts +3 -0
  38. package/dist/types/internationalization/locales/de.d.ts +368 -0
  39. package/dist/{lib/internationalization/locales/en.d.cts → types/internationalization/locales/en.d.ts} +2 -1
  40. package/dist/types/internationalization/locales/fr.d.ts +346 -0
  41. package/dist/types/internationalization/locales/ja.d.ts +307 -0
  42. package/dist/types/internationalization/locales/ko.d.ts +221 -0
  43. package/dist/types/internationalization/locales/zh.d.ts +452 -0
  44. package/dist/{lib → types}/internationalization/translatable.d.ts +1 -1
  45. package/dist/{lib → types}/models/FileRegistry.d.ts +6 -1
  46. package/dist/{lib → types}/models/ReflectionSymbolId.d.ts +9 -3
  47. package/dist/{lib → types}/models/SourceReference.d.ts +5 -3
  48. package/dist/types/models.d.ts +1 -0
  49. package/dist/types/node-utils.d.ts +1 -0
  50. package/dist/{lib → types}/output/components.d.ts +3 -3
  51. package/dist/{lib → types}/output/events.d.ts +1 -2
  52. package/dist/{lib → types}/output/formatter.d.ts +1 -2
  53. package/dist/{lib → types}/output/output.d.ts +2 -2
  54. package/dist/{lib → types}/output/renderer.d.ts +4 -5
  55. package/dist/{lib → types}/output/router.d.ts +3 -2
  56. package/dist/{lib → types}/output/themes/MarkedPlugin.d.ts +3 -3
  57. package/dist/{lib → types}/output/themes/default/DefaultTheme.d.ts +1 -1
  58. package/dist/{lib → types}/output/themes/default/DefaultThemeRenderContext.d.ts +25 -25
  59. package/dist/{lib → types}/output/themes/default/layouts/default.d.ts +1 -1
  60. package/dist/{lib → types}/output/themes/default/partials/anchor-icon.d.ts +1 -1
  61. package/dist/{lib → types}/output/themes/default/partials/breadcrumb.d.ts +1 -1
  62. package/dist/{lib → types}/output/themes/default/partials/comment.d.ts +1 -1
  63. package/dist/{lib → types}/output/themes/default/partials/header.d.ts +1 -1
  64. package/dist/{lib → types}/output/themes/default/partials/hierarchy.d.ts +1 -1
  65. package/dist/{lib → types}/output/themes/default/partials/icon.d.ts +1 -1
  66. package/dist/{lib → types}/output/themes/default/partials/index.d.ts +1 -1
  67. package/dist/{lib → types}/output/themes/default/partials/member.d.ts +1 -1
  68. package/dist/{lib → types}/output/themes/default/partials/member.getterSetter.d.ts +1 -1
  69. package/dist/{lib → types}/output/themes/default/partials/member.signature.body.d.ts +1 -1
  70. package/dist/{lib → types}/output/themes/default/partials/member.signature.title.d.ts +2 -2
  71. package/dist/{lib → types}/output/themes/default/partials/member.signatures.d.ts +1 -1
  72. package/dist/{lib → types}/output/themes/default/partials/member.sources.d.ts +1 -1
  73. package/dist/{lib → types}/output/themes/default/partials/members.d.ts +1 -1
  74. package/dist/{lib → types}/output/themes/default/partials/moduleReflection.d.ts +1 -1
  75. package/dist/{lib → types}/output/themes/default/partials/navigation.d.ts +1 -1
  76. package/dist/{lib → types}/output/themes/default/partials/reflectionPreview.d.ts +1 -1
  77. package/dist/{lib → types}/output/themes/default/partials/toolbar.d.ts +1 -1
  78. package/dist/{lib → types}/output/themes/default/partials/type.d.ts +2 -2
  79. package/dist/{lib → types}/output/themes/default/partials/typeDetails.d.ts +2 -2
  80. package/dist/{lib → types}/output/themes/default/partials/typeParameters.d.ts +1 -1
  81. package/dist/{lib → types}/output/themes/default/templates/document.d.ts +1 -1
  82. package/dist/{lib → types}/output/themes/default/templates/hierarchy.d.ts +1 -1
  83. package/dist/{lib → types}/output/themes/default/templates/index.d.ts +1 -1
  84. package/dist/{lib → types}/output/themes/default/templates/reflection.d.ts +1 -1
  85. package/dist/{lib → types}/output/themes/lib.d.ts +1 -1
  86. package/dist/types/serialization.d.ts +1 -0
  87. package/dist/types/tsconfig.tsbuildinfo +1 -0
  88. package/dist/{lib → types}/utils/ValidatingFileRegistry.d.ts +1 -1
  89. package/dist/{lib → types}/utils/entry-point.d.ts +2 -2
  90. package/dist/{lib → types}/utils/general.d.ts +3 -0
  91. package/dist/types/utils/index.d.ts +22 -0
  92. package/dist/{lib → types}/utils/options/declaration.d.ts +2 -1
  93. package/dist/{lib → types}/utils/options/defaults.d.ts +1 -1
  94. package/dist/{lib → types}/utils/options/index.d.ts +2 -1
  95. package/dist/{lib → types}/utils/options/options.d.ts +1 -1
  96. package/dist/{lib → types}/utils/options/tsdoc-defaults.d.ts +1 -1
  97. package/dist/{lib → types}/utils/reflections.d.ts +1 -1
  98. package/dist/{lib → types}/utils/sort.d.ts +1 -2
  99. package/dist/{lib → types}/utils-common/general.d.ts +4 -4
  100. package/dist/{lib → types}/utils-common/jsx.elements.d.ts +16 -0
  101. package/dist/types/utils-common.d.ts +1 -0
  102. package/dist/{lib → types}/validation/documentation.d.ts +1 -1
  103. package/dist/{lib → types}/validation/exports.d.ts +1 -1
  104. package/dist/types/validation/filePaths.d.ts +3 -0
  105. package/dist/{lib → types}/validation/links.d.ts +1 -1
  106. package/dist/{lib → types}/validation/unusedMergeModuleWith.d.ts +1 -1
  107. package/dist/utils-common.js +1311 -0
  108. package/package.json +46 -37
  109. package/static/main.js +4 -4
  110. package/static/style.css +18 -3
  111. package/tsdoc.json +4 -0
  112. package/typedoc-config.schema.json +2 -0
  113. package/dist/lib/application-events.js +0 -5
  114. package/dist/lib/application.js +0 -716
  115. package/dist/lib/cli.js +0 -111
  116. package/dist/lib/converter/comments/blockLexer.js +0 -391
  117. package/dist/lib/converter/comments/declarationReferenceResolver.js +0 -218
  118. package/dist/lib/converter/comments/discovery.js +0 -563
  119. package/dist/lib/converter/comments/index.js +0 -241
  120. package/dist/lib/converter/comments/lexer.js +0 -10
  121. package/dist/lib/converter/comments/lineLexer.js +0 -279
  122. package/dist/lib/converter/comments/linkResolver.js +0 -186
  123. package/dist/lib/converter/comments/parser.js +0 -538
  124. package/dist/lib/converter/comments/rawLexer.js +0 -218
  125. package/dist/lib/converter/comments/tagName.js +0 -58
  126. package/dist/lib/converter/comments/textParser.js +0 -372
  127. package/dist/lib/converter/components.js +0 -3
  128. package/dist/lib/converter/context.js +0 -311
  129. package/dist/lib/converter/convert-expression.js +0 -58
  130. package/dist/lib/converter/converter-events.js +0 -13
  131. package/dist/lib/converter/converter.js +0 -705
  132. package/dist/lib/converter/factories/index-signature.js +0 -50
  133. package/dist/lib/converter/factories/signature.js +0 -353
  134. package/dist/lib/converter/factories/symbol-id.js +0 -50
  135. package/dist/lib/converter/index.js +0 -3
  136. package/dist/lib/converter/jsdoc.js +0 -135
  137. package/dist/lib/converter/plugins/CategoryPlugin.js +0 -278
  138. package/dist/lib/converter/plugins/CommentPlugin.js +0 -770
  139. package/dist/lib/converter/plugins/GroupPlugin.js +0 -281
  140. package/dist/lib/converter/plugins/ImplementsPlugin.js +0 -438
  141. package/dist/lib/converter/plugins/IncludePlugin.js +0 -254
  142. package/dist/lib/converter/plugins/InheritDocPlugin.js +0 -220
  143. package/dist/lib/converter/plugins/LinkResolverPlugin.js +0 -88
  144. package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +0 -50
  145. package/dist/lib/converter/plugins/PackagePlugin.js +0 -188
  146. package/dist/lib/converter/plugins/SourcePlugin.js +0 -215
  147. package/dist/lib/converter/plugins/TypePlugin.js +0 -108
  148. package/dist/lib/converter/plugins/index.js +0 -10
  149. package/dist/lib/converter/symbols.js +0 -861
  150. package/dist/lib/converter/types.js +0 -833
  151. package/dist/lib/converter/utils/nodes.js +0 -26
  152. package/dist/lib/converter/utils/reflections.js +0 -17
  153. package/dist/lib/converter/utils/repository.js +0 -295
  154. package/dist/lib/converter/utils/symbols.js +0 -12
  155. package/dist/lib/debug/index.js +0 -2
  156. package/dist/lib/debug/reflectionLifetimes.js +0 -27
  157. package/dist/lib/debug/rendererUrls.js +0 -68
  158. package/dist/lib/internationalization/index.js +0 -7
  159. package/dist/lib/internationalization/internationalization.js +0 -64
  160. package/dist/lib/internationalization/locale-utils.cjs +0 -8
  161. package/dist/lib/internationalization/locale-utils.d.cts +0 -8
  162. package/dist/lib/internationalization/locales/de.cjs +0 -401
  163. package/dist/lib/internationalization/locales/de.d.cts +0 -368
  164. package/dist/lib/internationalization/locales/en.cjs +0 -411
  165. package/dist/lib/internationalization/locales/ja.cjs +0 -320
  166. package/dist/lib/internationalization/locales/ja.d.cts +0 -307
  167. package/dist/lib/internationalization/locales/ko.cjs +0 -233
  168. package/dist/lib/internationalization/locales/ko.d.cts +0 -221
  169. package/dist/lib/internationalization/locales/zh.cjs +0 -488
  170. package/dist/lib/internationalization/locales/zh.d.cts +0 -452
  171. package/dist/lib/internationalization/translatable.js +0 -8
  172. package/dist/lib/models/Comment.js +0 -534
  173. package/dist/lib/models/ContainerReflection.js +0 -159
  174. package/dist/lib/models/DeclarationReflection.js +0 -287
  175. package/dist/lib/models/DocumentReflection.js +0 -66
  176. package/dist/lib/models/FileRegistry.js +0 -133
  177. package/dist/lib/models/ParameterReflection.js +0 -39
  178. package/dist/lib/models/ProjectReflection.js +0 -417
  179. package/dist/lib/models/ReferenceReflection.js +0 -85
  180. package/dist/lib/models/Reflection.js +0 -495
  181. package/dist/lib/models/ReflectionCategory.js +0 -56
  182. package/dist/lib/models/ReflectionGroup.js +0 -72
  183. package/dist/lib/models/ReflectionSymbolId.js +0 -85
  184. package/dist/lib/models/SignatureReflection.js +0 -96
  185. package/dist/lib/models/SourceReference.js +0 -50
  186. package/dist/lib/models/TypeParameterReflection.js +0 -45
  187. package/dist/lib/models/index.js +0 -19
  188. package/dist/lib/models/kind.js +0 -231
  189. package/dist/lib/models/types.js +0 -1296
  190. package/dist/lib/models/utils.js +0 -26
  191. package/dist/lib/models/variant.js +0 -1
  192. package/dist/lib/output/components.js +0 -133
  193. package/dist/lib/output/events.js +0 -195
  194. package/dist/lib/output/formatter.js +0 -660
  195. package/dist/lib/output/index.js +0 -7
  196. package/dist/lib/output/output.js +0 -92
  197. package/dist/lib/output/plugins/AssetsPlugin.js +0 -160
  198. package/dist/lib/output/plugins/HierarchyPlugin.js +0 -65
  199. package/dist/lib/output/plugins/IconsPlugin.js +0 -54
  200. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +0 -222
  201. package/dist/lib/output/plugins/NavigationPlugin.js +0 -23
  202. package/dist/lib/output/plugins/SitemapPlugin.js +0 -82
  203. package/dist/lib/output/plugins/index.js +0 -7
  204. package/dist/lib/output/renderer.js +0 -387
  205. package/dist/lib/output/router.js +0 -520
  206. package/dist/lib/output/theme.js +0 -17
  207. package/dist/lib/output/themes/MarkedPlugin.js +0 -461
  208. package/dist/lib/output/themes/default/DefaultTheme.js +0 -367
  209. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +0 -151
  210. package/dist/lib/output/themes/default/Slugger.js +0 -60
  211. package/dist/lib/output/themes/default/layouts/default.js +0 -89
  212. package/dist/lib/output/themes/default/partials/anchor-icon.js +0 -9
  213. package/dist/lib/output/themes/default/partials/breadcrumb.js +0 -11
  214. package/dist/lib/output/themes/default/partials/comment.js +0 -80
  215. package/dist/lib/output/themes/default/partials/footer.js +0 -37
  216. package/dist/lib/output/themes/default/partials/header.js +0 -39
  217. package/dist/lib/output/themes/default/partials/hierarchy.js +0 -32
  218. package/dist/lib/output/themes/default/partials/icon.js +0 -101
  219. package/dist/lib/output/themes/default/partials/index.js +0 -24
  220. package/dist/lib/output/themes/default/partials/member.declaration.js +0 -35
  221. package/dist/lib/output/themes/default/partials/member.getterSetter.js +0 -12
  222. package/dist/lib/output/themes/default/partials/member.js +0 -36
  223. package/dist/lib/output/themes/default/partials/member.signature.body.js +0 -33
  224. package/dist/lib/output/themes/default/partials/member.signature.title.js +0 -9
  225. package/dist/lib/output/themes/default/partials/member.signatures.js +0 -9
  226. package/dist/lib/output/themes/default/partials/member.sources.js +0 -55
  227. package/dist/lib/output/themes/default/partials/members.js +0 -17
  228. package/dist/lib/output/themes/default/partials/moduleReflection.js +0 -68
  229. package/dist/lib/output/themes/default/partials/navigation.js +0 -144
  230. package/dist/lib/output/themes/default/partials/reflectionPreview.js +0 -26
  231. package/dist/lib/output/themes/default/partials/toolbar.js +0 -13
  232. package/dist/lib/output/themes/default/partials/type.js +0 -9
  233. package/dist/lib/output/themes/default/partials/typeAndParent.js +0 -28
  234. package/dist/lib/output/themes/default/partials/typeDetails.js +0 -284
  235. package/dist/lib/output/themes/default/partials/typeParameters.js +0 -26
  236. package/dist/lib/output/themes/default/templates/document.js +0 -3
  237. package/dist/lib/output/themes/default/templates/hierarchy.js +0 -31
  238. package/dist/lib/output/themes/default/templates/index.js +0 -3
  239. package/dist/lib/output/themes/default/templates/reflection.js +0 -53
  240. package/dist/lib/output/themes/lib.js +0 -218
  241. package/dist/lib/serialization/components.js +0 -1
  242. package/dist/lib/serialization/deserializer.js +0 -235
  243. package/dist/lib/serialization/events.js +0 -18
  244. package/dist/lib/serialization/index.js +0 -4
  245. package/dist/lib/serialization/schema.js +0 -32
  246. package/dist/lib/serialization/serializer.js +0 -65
  247. package/dist/lib/utils/ValidatingFileRegistry.js +0 -52
  248. package/dist/lib/utils/component.js +0 -41
  249. package/dist/lib/utils/compress.js +0 -13
  250. package/dist/lib/utils/declaration-maps.js +0 -51
  251. package/dist/lib/utils/entry-point.js +0 -330
  252. package/dist/lib/utils/fs.js +0 -372
  253. package/dist/lib/utils/general.js +0 -25
  254. package/dist/lib/utils/highlighter.js +0 -150
  255. package/dist/lib/utils/html-entities.js +0 -2329
  256. package/dist/lib/utils/html.js +0 -635
  257. package/dist/lib/utils/index.d.ts +0 -17
  258. package/dist/lib/utils/index.js +0 -15
  259. package/dist/lib/utils/loggers.js +0 -71
  260. package/dist/lib/utils/options/declaration.js +0 -443
  261. package/dist/lib/utils/options/defaults.js +0 -104
  262. package/dist/lib/utils/options/help.js +0 -63
  263. package/dist/lib/utils/options/index.js +0 -4
  264. package/dist/lib/utils/options/options.js +0 -273
  265. package/dist/lib/utils/options/readers/arguments.js +0 -109
  266. package/dist/lib/utils/options/readers/index.js +0 -4
  267. package/dist/lib/utils/options/readers/package-json.js +0 -40
  268. package/dist/lib/utils/options/readers/tsconfig.js +0 -172
  269. package/dist/lib/utils/options/readers/typedoc.js +0 -136
  270. package/dist/lib/utils/options/sources/index.js +0 -1
  271. package/dist/lib/utils/options/sources/typedoc.js +0 -876
  272. package/dist/lib/utils/options/tsdoc-defaults.js +0 -94
  273. package/dist/lib/utils/package-manifest.js +0 -84
  274. package/dist/lib/utils/paths.js +0 -127
  275. package/dist/lib/utils/perf.js +0 -86
  276. package/dist/lib/utils/plugins.js +0 -61
  277. package/dist/lib/utils/reflections.js +0 -64
  278. package/dist/lib/utils/sort.js +0 -153
  279. package/dist/lib/utils/tsconfig.js +0 -60
  280. package/dist/lib/utils/tsutils.js +0 -23
  281. package/dist/lib/utils-common/array.js +0 -152
  282. package/dist/lib/utils-common/declarationReference.js +0 -341
  283. package/dist/lib/utils-common/enum.js +0 -27
  284. package/dist/lib/utils-common/events.js +0 -49
  285. package/dist/lib/utils-common/general.js +0 -22
  286. package/dist/lib/utils-common/hooks.js +0 -90
  287. package/dist/lib/utils-common/i18n.js +0 -39
  288. package/dist/lib/utils-common/index.js +0 -17
  289. package/dist/lib/utils-common/jsx.elements.js +0 -3
  290. package/dist/lib/utils-common/jsx.js +0 -187
  291. package/dist/lib/utils-common/logger.js +0 -129
  292. package/dist/lib/utils-common/map.js +0 -63
  293. package/dist/lib/utils-common/minimalSourceFile.js +0 -43
  294. package/dist/lib/utils-common/path.js +0 -130
  295. package/dist/lib/utils-common/set.js +0 -23
  296. package/dist/lib/utils-common/string.js +0 -84
  297. package/dist/lib/utils-common/validation.js +0 -50
  298. package/dist/lib/validation/documentation.js +0 -91
  299. package/dist/lib/validation/exports.js +0 -65
  300. package/dist/lib/validation/links.js +0 -78
  301. package/dist/lib/validation/unusedMergeModuleWith.js +0 -12
  302. /package/dist/{browser-utils.d.ts → types/browser-utils.d.ts} +0 -0
  303. /package/dist/{lib → types}/cli.d.ts +0 -0
  304. /package/dist/{lib → types}/converter/comments/blockLexer.d.ts +0 -0
  305. /package/dist/{lib → types}/converter/comments/lineLexer.d.ts +0 -0
  306. /package/dist/{lib → types}/converter/comments/rawLexer.d.ts +0 -0
  307. /package/dist/{lib → types}/converter/comments/tagName.d.ts +0 -0
  308. /package/dist/{lib → types}/converter/convert-expression.d.ts +0 -0
  309. /package/dist/{lib → types}/converter/converter-events.d.ts +0 -0
  310. /package/dist/{lib → types}/converter/factories/index-signature.d.ts +0 -0
  311. /package/dist/{lib → types}/converter/factories/symbol-id.d.ts +0 -0
  312. /package/dist/{lib → types}/converter/jsdoc.d.ts +0 -0
  313. /package/dist/{lib → types}/converter/plugins/CommentPlugin.d.ts +0 -0
  314. /package/dist/{lib → types}/converter/plugins/ImplementsPlugin.d.ts +0 -0
  315. /package/dist/{lib → types}/converter/plugins/MergeModuleWithPlugin.d.ts +0 -0
  316. /package/dist/{lib → types}/converter/plugins/PackagePlugin.d.ts +0 -0
  317. /package/dist/{lib → types}/converter/plugins/index.d.ts +0 -0
  318. /package/dist/{lib → types}/converter/symbols.d.ts +0 -0
  319. /package/dist/{lib/converter/utils → types/converter/utilities}/nodes.d.ts +0 -0
  320. /package/dist/{lib/converter/utils → types/converter/utilities}/symbols.d.ts +0 -0
  321. /package/dist/{lib → types}/debug/index.d.ts +0 -0
  322. /package/dist/{lib → types}/debug/reflectionLifetimes.d.ts +0 -0
  323. /package/dist/{lib → types}/debug/rendererUrls.d.ts +0 -0
  324. /package/dist/{lib → types}/internationalization/index.d.ts +0 -0
  325. /package/dist/{lib → types}/models/Comment.d.ts +0 -0
  326. /package/dist/{lib → types}/models/ContainerReflection.d.ts +0 -0
  327. /package/dist/{lib → types}/models/DeclarationReflection.d.ts +0 -0
  328. /package/dist/{lib → types}/models/DocumentReflection.d.ts +0 -0
  329. /package/dist/{lib → types}/models/ParameterReflection.d.ts +0 -0
  330. /package/dist/{lib → types}/models/ProjectReflection.d.ts +0 -0
  331. /package/dist/{lib → types}/models/ReferenceReflection.d.ts +0 -0
  332. /package/dist/{lib → types}/models/Reflection.d.ts +0 -0
  333. /package/dist/{lib → types}/models/ReflectionCategory.d.ts +0 -0
  334. /package/dist/{lib → types}/models/ReflectionGroup.d.ts +0 -0
  335. /package/dist/{lib → types}/models/SignatureReflection.d.ts +0 -0
  336. /package/dist/{lib → types}/models/TypeParameterReflection.d.ts +0 -0
  337. /package/dist/{lib → types}/models/index.d.ts +0 -0
  338. /package/dist/{lib → types}/models/kind.d.ts +0 -0
  339. /package/dist/{lib → types}/models/types.d.ts +0 -0
  340. /package/dist/{lib → types}/models/utils.d.ts +0 -0
  341. /package/dist/{lib → types}/models/variant.d.ts +0 -0
  342. /package/dist/{lib → types}/output/index.d.ts +0 -0
  343. /package/dist/{lib → types}/output/plugins/AssetsPlugin.d.ts +0 -0
  344. /package/dist/{lib → types}/output/plugins/HierarchyPlugin.d.ts +0 -0
  345. /package/dist/{lib → types}/output/plugins/IconsPlugin.d.ts +0 -0
  346. /package/dist/{lib → types}/output/plugins/JavascriptIndexPlugin.d.ts +0 -0
  347. /package/dist/{lib → types}/output/plugins/NavigationPlugin.d.ts +0 -0
  348. /package/dist/{lib → types}/output/plugins/SitemapPlugin.d.ts +0 -0
  349. /package/dist/{lib → types}/output/plugins/index.d.ts +0 -0
  350. /package/dist/{lib → types}/output/theme.d.ts +0 -0
  351. /package/dist/{lib → types}/output/themes/default/Slugger.d.ts +0 -0
  352. /package/dist/{lib → types}/output/themes/default/partials/footer.d.ts +0 -0
  353. /package/dist/{lib → types}/output/themes/default/partials/member.declaration.d.ts +0 -0
  354. /package/dist/{lib → types}/output/themes/default/partials/typeAndParent.d.ts +0 -0
  355. /package/dist/{lib → types}/serialization/components.d.ts +0 -0
  356. /package/dist/{lib → types}/serialization/deserializer.d.ts +0 -0
  357. /package/dist/{lib → types}/serialization/events.d.ts +0 -0
  358. /package/dist/{lib → types}/serialization/index.d.ts +0 -0
  359. /package/dist/{lib → types}/serialization/schema.d.ts +0 -0
  360. /package/dist/{lib → types}/serialization/serializer.d.ts +0 -0
  361. /package/dist/{lib → types}/utils/component.d.ts +0 -0
  362. /package/dist/{lib → types}/utils/compress.d.ts +0 -0
  363. /package/dist/{lib → types}/utils/declaration-maps.d.ts +0 -0
  364. /package/dist/{lib → types}/utils/fs.d.ts +0 -0
  365. /package/dist/{lib → types}/utils/highlighter.d.ts +0 -0
  366. /package/dist/{lib → types}/utils/html-entities.d.ts +0 -0
  367. /package/dist/{lib → types}/utils/html.d.ts +0 -0
  368. /package/dist/{lib → types}/utils/loggers.d.ts +0 -0
  369. /package/dist/{lib → types}/utils/options/help.d.ts +0 -0
  370. /package/dist/{lib → types}/utils/options/readers/arguments.d.ts +0 -0
  371. /package/dist/{lib → types}/utils/options/readers/index.d.ts +0 -0
  372. /package/dist/{lib → types}/utils/options/readers/package-json.d.ts +0 -0
  373. /package/dist/{lib → types}/utils/options/readers/tsconfig.d.ts +0 -0
  374. /package/dist/{lib → types}/utils/options/readers/typedoc.d.ts +0 -0
  375. /package/dist/{lib → types}/utils/options/sources/index.d.ts +0 -0
  376. /package/dist/{lib → types}/utils/options/sources/typedoc.d.ts +0 -0
  377. /package/dist/{lib → types}/utils/package-manifest.d.ts +0 -0
  378. /package/dist/{lib → types}/utils/paths.d.ts +0 -0
  379. /package/dist/{lib → types}/utils/perf.d.ts +0 -0
  380. /package/dist/{lib → types}/utils/plugins.d.ts +0 -0
  381. /package/dist/{lib → types}/utils/tsconfig.d.ts +0 -0
  382. /package/dist/{lib → types}/utils/tsutils.d.ts +0 -0
  383. /package/dist/{lib → types}/utils-common/array.d.ts +0 -0
  384. /package/dist/{lib → types}/utils-common/declarationReference.d.ts +0 -0
  385. /package/dist/{lib → types}/utils-common/enum.d.ts +0 -0
  386. /package/dist/{lib → types}/utils-common/events.d.ts +0 -0
  387. /package/dist/{lib → types}/utils-common/hooks.d.ts +0 -0
  388. /package/dist/{lib → types}/utils-common/i18n.d.ts +0 -0
  389. /package/dist/{lib → types}/utils-common/index.d.ts +0 -0
  390. /package/dist/{lib → types}/utils-common/jsx.d.ts +0 -0
  391. /package/dist/{lib → types}/utils-common/logger.d.ts +0 -0
  392. /package/dist/{lib → types}/utils-common/map.d.ts +0 -0
  393. /package/dist/{lib → types}/utils-common/minimalSourceFile.d.ts +0 -0
  394. /package/dist/{lib → types}/utils-common/path.d.ts +0 -0
  395. /package/dist/{lib → types}/utils-common/set.d.ts +0 -0
  396. /package/dist/{lib → types}/utils-common/string.d.ts +0 -0
  397. /package/dist/{lib → types}/utils-common/validation.d.ts +0 -0
@@ -1,876 +0,0 @@
1
- import { CommentStyle, EmitStrategy, ParameterHint, ParameterType } from "../declaration.js";
2
- import * as OptionDefaults from "../defaults.js";
3
- import { SORT_STRATEGIES } from "../../sort.js";
4
- import { EntryPointStrategy } from "../../entry-point.js";
5
- import { ReflectionKind } from "../../../models/kind.js";
6
- import { blockTags, inlineTags, modifierTags } from "../tsdoc-defaults.js";
7
- import { getEnumKeys, i18n, LogLevel, setDifference, Validation } from "#utils";
8
- import { getSupportedLanguages, getSupportedThemes } from "../../highlighter.js";
9
- import { extname } from "path";
10
- function makeTagArrayValidator(name) {
11
- return (value) => {
12
- if (!Validation.validate([Array, Validation.isTagString], value)) {
13
- throw new Error(i18n.option_0_values_must_be_array_of_tags(name));
14
- }
15
- };
16
- }
17
- // For convenience, added in the same order as they are documented on the website.
18
- export function addTypeDocOptions(options) {
19
- // MARK: Configuration Options
20
- options.addDeclaration({
21
- type: ParameterType.Path,
22
- name: "options",
23
- help: () => i18n.help_options(),
24
- hint: ParameterHint.File,
25
- defaultValue: "",
26
- });
27
- options.addDeclaration({
28
- type: ParameterType.Path,
29
- name: "tsconfig",
30
- help: () => i18n.help_tsconfig(),
31
- hint: ParameterHint.File,
32
- defaultValue: "",
33
- });
34
- options.addDeclaration({
35
- name: "compilerOptions",
36
- help: () => i18n.help_compilerOptions(),
37
- type: ParameterType.Mixed,
38
- configFileOnly: true,
39
- validate(value) {
40
- if (!Validation.validate({}, value)) {
41
- throw new Error(i18n.option_0_must_be_an_object("compilerOptions"));
42
- }
43
- },
44
- });
45
- options.addDeclaration({
46
- name: "lang",
47
- help: () => i18n.help_lang(),
48
- type: ParameterType.String,
49
- defaultValue: "en",
50
- });
51
- options.addDeclaration({
52
- name: "locales",
53
- help: () => i18n.help_locales(),
54
- type: ParameterType.Mixed,
55
- configFileOnly: true,
56
- defaultValue: {},
57
- validate(value) {
58
- if (typeof value !== "object" || !value) {
59
- throw new Error(i18n.locales_must_be_an_object());
60
- }
61
- for (const val of Object.values(value)) {
62
- if (typeof val !== "object" || !val) {
63
- throw new Error(i18n.locales_must_be_an_object());
64
- }
65
- for (const val2 of Object.values(val)) {
66
- if (typeof val2 !== "string") {
67
- throw new Error(i18n.locales_must_be_an_object());
68
- }
69
- }
70
- }
71
- },
72
- });
73
- options.addDeclaration({
74
- name: "packageOptions",
75
- help: () => i18n.help_packageOptions(),
76
- type: ParameterType.Mixed,
77
- configFileOnly: true,
78
- defaultValue: {},
79
- validate(value) {
80
- if (!Validation.validate({}, value)) {
81
- throw new Error(i18n.option_0_must_be_an_object("packageOptions"));
82
- }
83
- },
84
- });
85
- // MARK: Input Options
86
- options.addDeclaration({
87
- name: "entryPoints",
88
- help: () => i18n.help_entryPoints(),
89
- type: ParameterType.GlobArray,
90
- });
91
- options.addDeclaration({
92
- name: "entryPointStrategy",
93
- help: () => i18n.help_entryPointStrategy(),
94
- type: ParameterType.Map,
95
- map: EntryPointStrategy,
96
- defaultValue: EntryPointStrategy.Resolve,
97
- });
98
- options.addDeclaration({
99
- name: "alwaysCreateEntryPointModule",
100
- help: () => i18n.help_alwaysCreateEntryPointModule(),
101
- type: ParameterType.Boolean,
102
- });
103
- options.addDeclaration({
104
- name: "projectDocuments",
105
- help: () => i18n.help_projectDocuments(),
106
- type: ParameterType.GlobArray,
107
- });
108
- options.addDeclaration({
109
- name: "exclude",
110
- help: () => i18n.help_exclude(),
111
- type: ParameterType.GlobArray,
112
- });
113
- options.addDeclaration({
114
- name: "externalPattern",
115
- help: () => i18n.help_externalPattern(),
116
- type: ParameterType.GlobArray,
117
- defaultValue: ["**/node_modules/**"],
118
- });
119
- options.addDeclaration({
120
- name: "excludeExternals",
121
- help: () => i18n.help_excludeExternals(),
122
- type: ParameterType.Boolean,
123
- });
124
- options.addDeclaration({
125
- name: "excludeNotDocumented",
126
- help: () => i18n.help_excludeNotDocumented(),
127
- type: ParameterType.Boolean,
128
- });
129
- options.addDeclaration({
130
- name: "excludeNotDocumentedKinds",
131
- help: () => i18n.help_excludeNotDocumentedKinds(),
132
- type: ParameterType.Array,
133
- validate(value) {
134
- const invalid = new Set(value);
135
- const valid = new Set(getEnumKeys(ReflectionKind));
136
- for (const notPermitted of [
137
- ReflectionKind.Project,
138
- ReflectionKind.TypeLiteral,
139
- ReflectionKind.TypeParameter,
140
- ReflectionKind.Parameter,
141
- ]) {
142
- valid.delete(ReflectionKind[notPermitted]);
143
- }
144
- for (const v of valid) {
145
- invalid.delete(v);
146
- }
147
- if (invalid.size !== 0) {
148
- throw new Error(i18n.exclude_not_documented_specified_0_valid_values_are_1(Array.from(invalid).join(", "), Array.from(valid).join(", ")));
149
- }
150
- },
151
- defaultValue: OptionDefaults.excludeNotDocumentedKinds,
152
- });
153
- options.addDeclaration({
154
- name: "excludeInternal",
155
- help: () => i18n.help_excludeInternal(),
156
- type: ParameterType.Boolean,
157
- });
158
- options.addDeclaration({
159
- name: "excludeCategories",
160
- help: () => i18n.help_excludeCategories(),
161
- type: ParameterType.Array,
162
- defaultValue: [],
163
- });
164
- options.addDeclaration({
165
- name: "excludePrivate",
166
- help: () => i18n.help_excludePrivate(),
167
- type: ParameterType.Boolean,
168
- defaultValue: true,
169
- });
170
- options.addDeclaration({
171
- name: "excludePrivateClassFields",
172
- help: () => i18n.help_excludePrivateClassFields(),
173
- type: ParameterType.Boolean,
174
- defaultValue: true,
175
- });
176
- options.addDeclaration({
177
- name: "excludeProtected",
178
- help: () => i18n.help_excludeProtected(),
179
- type: ParameterType.Boolean,
180
- });
181
- options.addDeclaration({
182
- name: "excludeReferences",
183
- help: () => i18n.help_excludeReferences(),
184
- type: ParameterType.Boolean,
185
- });
186
- options.addDeclaration({
187
- name: "externalSymbolLinkMappings",
188
- help: () => i18n.help_externalSymbolLinkMappings(),
189
- type: ParameterType.Mixed,
190
- defaultValue: {},
191
- validate(value) {
192
- if (!Validation.validate({}, value)) {
193
- throw new Error(i18n.external_symbol_link_mappings_must_be_object());
194
- }
195
- for (const mappings of Object.values(value)) {
196
- if (!Validation.validate({}, mappings)) {
197
- throw new Error(i18n.external_symbol_link_mappings_must_be_object());
198
- }
199
- for (const link of Object.values(mappings)) {
200
- if (typeof link !== "string") {
201
- throw new Error(i18n.external_symbol_link_mappings_must_be_object());
202
- }
203
- }
204
- }
205
- },
206
- });
207
- options.addDeclaration({
208
- name: "readme",
209
- help: () => i18n.help_readme(),
210
- type: ParameterType.Path,
211
- });
212
- options.addDeclaration({
213
- name: "basePath",
214
- help: () => i18n.help_basePath(),
215
- type: ParameterType.Path,
216
- });
217
- // MARK: Output Options
218
- options.addDeclaration({
219
- name: "outputs",
220
- help: () => i18n.help_out(),
221
- type: ParameterType.Mixed,
222
- configFileOnly: true,
223
- defaultValue: undefined,
224
- validate(value) {
225
- if (!Validation.validate([
226
- Array,
227
- {
228
- name: String,
229
- path: String,
230
- options: Validation.optional({
231
- [Validation.additionalProperties]: true,
232
- }),
233
- },
234
- ], value)) {
235
- throw new Error(i18n.option_outputs_must_be_array());
236
- }
237
- },
238
- });
239
- options.addDeclaration({
240
- name: "out",
241
- help: () => i18n.help_out(),
242
- type: ParameterType.Path,
243
- hint: ParameterHint.Directory,
244
- defaultValue: "./docs",
245
- });
246
- options.addDeclaration({
247
- name: "html",
248
- outputShortcut: "html",
249
- help: () => i18n.help_html(),
250
- type: ParameterType.Path,
251
- hint: ParameterHint.Directory,
252
- });
253
- options.addDeclaration({
254
- name: "json",
255
- outputShortcut: "json",
256
- help: () => i18n.help_json(),
257
- type: ParameterType.Path,
258
- hint: ParameterHint.File,
259
- });
260
- options.addDeclaration({
261
- name: "pretty",
262
- help: () => i18n.help_pretty(),
263
- type: ParameterType.Boolean,
264
- defaultValue: true,
265
- });
266
- options.addDeclaration({
267
- name: "emit",
268
- help: () => i18n.help_emit(),
269
- type: ParameterType.Map,
270
- map: EmitStrategy,
271
- defaultValue: "docs",
272
- });
273
- options.addDeclaration({
274
- name: "theme",
275
- help: () => i18n.help_theme(),
276
- type: ParameterType.String,
277
- defaultValue: "default",
278
- });
279
- options.addDeclaration({
280
- name: "router",
281
- help: () => i18n.help_router(),
282
- type: ParameterType.String,
283
- defaultValue: "kind",
284
- });
285
- const defaultLightTheme = "light-plus";
286
- const defaultDarkTheme = "dark-plus";
287
- options.addDeclaration({
288
- name: "lightHighlightTheme",
289
- help: () => i18n.help_lightHighlightTheme(),
290
- type: ParameterType.String,
291
- defaultValue: defaultLightTheme,
292
- validate(value) {
293
- if (!getSupportedThemes().includes(value)) {
294
- throw new Error(i18n.highlight_theme_0_must_be_one_of_1("lightHighlightTheme", getSupportedThemes().join(", ")));
295
- }
296
- },
297
- });
298
- options.addDeclaration({
299
- name: "darkHighlightTheme",
300
- help: () => i18n.help_darkHighlightTheme(),
301
- type: ParameterType.String,
302
- defaultValue: defaultDarkTheme,
303
- validate(value) {
304
- if (!getSupportedThemes().includes(value)) {
305
- throw new Error(i18n.highlight_theme_0_must_be_one_of_1("darkHighlightTheme", getSupportedThemes().join(", ")));
306
- }
307
- },
308
- });
309
- options.addDeclaration({
310
- name: "highlightLanguages",
311
- help: () => i18n.help_highlightLanguages(),
312
- type: ParameterType.Array,
313
- defaultValue: OptionDefaults.highlightLanguages,
314
- validate(value) {
315
- const invalid = setDifference(value, getSupportedLanguages());
316
- if (invalid.size) {
317
- throw new Error(i18n.highlightLanguages_contains_invalid_languages_0(Array.from(invalid).join(", ")));
318
- }
319
- },
320
- });
321
- options.addDeclaration({
322
- name: "ignoredHighlightLanguages",
323
- help: () => i18n.help_ignoredHighlightLanguages(),
324
- type: ParameterType.Array,
325
- defaultValue: OptionDefaults.ignoredHighlightLanguages,
326
- });
327
- options.addDeclaration({
328
- name: "typePrintWidth",
329
- help: () => i18n.help_typePrintWidth(),
330
- type: ParameterType.Number,
331
- defaultValue: 80,
332
- });
333
- options.addDeclaration({
334
- name: "customCss",
335
- help: () => i18n.help_customCss(),
336
- type: ParameterType.Path,
337
- });
338
- options.addDeclaration({
339
- name: "customJs",
340
- help: () => i18n.help_customJs(),
341
- type: ParameterType.Path,
342
- });
343
- options.addDeclaration({
344
- name: "markdownItOptions",
345
- help: () => i18n.help_markdownItOptions(),
346
- type: ParameterType.Mixed,
347
- configFileOnly: true,
348
- defaultValue: {
349
- html: true,
350
- linkify: true,
351
- },
352
- validate(value) {
353
- if (!Validation.validate({}, value)) {
354
- throw new Error(i18n.option_0_must_be_an_object("markdownItOptions"));
355
- }
356
- },
357
- });
358
- options.addDeclaration({
359
- name: "markdownItLoader",
360
- help: () => i18n.help_markdownItLoader(),
361
- type: ParameterType.Mixed,
362
- configFileOnly: true,
363
- defaultValue: () => { },
364
- validate(value) {
365
- if (typeof value !== "function") {
366
- throw new Error(i18n.option_0_must_be_a_function("markdownItLoader"));
367
- }
368
- },
369
- });
370
- options.addDeclaration({
371
- name: "maxTypeConversionDepth",
372
- help: () => i18n.help_maxTypeConversionDepth(),
373
- defaultValue: 10,
374
- type: ParameterType.Number,
375
- });
376
- options.addDeclaration({
377
- name: "name",
378
- help: () => i18n.help_name(),
379
- });
380
- options.addDeclaration({
381
- name: "includeVersion",
382
- help: () => i18n.help_includeVersion(),
383
- type: ParameterType.Boolean,
384
- });
385
- options.addDeclaration({
386
- name: "disableSources",
387
- help: () => i18n.help_disableSources(),
388
- type: ParameterType.Boolean,
389
- });
390
- options.addDeclaration({
391
- name: "sourceLinkTemplate",
392
- help: () => i18n.help_sourceLinkTemplate(),
393
- });
394
- options.addDeclaration({
395
- name: "gitRevision",
396
- help: () => i18n.help_gitRevision(),
397
- });
398
- options.addDeclaration({
399
- name: "gitRemote",
400
- help: () => i18n.help_gitRemote(),
401
- defaultValue: "origin",
402
- });
403
- options.addDeclaration({
404
- name: "disableGit",
405
- help: () => i18n.help_disableGit(),
406
- type: ParameterType.Boolean,
407
- });
408
- options.addDeclaration({
409
- name: "displayBasePath",
410
- help: () => i18n.help_displayBasePath(),
411
- type: ParameterType.Path,
412
- });
413
- options.addDeclaration({
414
- name: "cname",
415
- help: () => i18n.help_cname(),
416
- });
417
- options.addDeclaration({
418
- name: "favicon",
419
- help: () => i18n.help_favicon(),
420
- validate(value) {
421
- const allowedExtension = [".ico", ".png", ".svg"];
422
- if (!/^https?:\/\//i.test(value) &&
423
- !allowedExtension.includes(extname(value))) {
424
- throw new Error(i18n.favicon_must_have_one_of_the_following_extensions_0(allowedExtension.join(", ")));
425
- }
426
- },
427
- type: ParameterType.UrlOrPath,
428
- });
429
- options.addDeclaration({
430
- name: "sourceLinkExternal",
431
- help: () => i18n.help_sourceLinkExternal(),
432
- type: ParameterType.Boolean,
433
- });
434
- options.addDeclaration({
435
- name: "markdownLinkExternal",
436
- help: () => i18n.help_markdownLinkExternal(),
437
- type: ParameterType.Boolean,
438
- defaultValue: true,
439
- });
440
- options.addDeclaration({
441
- name: "githubPages",
442
- help: () => i18n.help_githubPages(),
443
- type: ParameterType.Boolean,
444
- defaultValue: true,
445
- });
446
- options.addDeclaration({
447
- name: "hostedBaseUrl",
448
- help: () => i18n.help_hostedBaseUrl(),
449
- validate(value) {
450
- if (!/^https?:\/\//i.test(value)) {
451
- throw new Error(i18n.hostedBaseUrl_must_start_with_http());
452
- }
453
- },
454
- });
455
- options.addDeclaration({
456
- name: "useHostedBaseUrlForAbsoluteLinks",
457
- help: () => i18n.help_useHostedBaseUrlForAbsoluteLinks(),
458
- type: ParameterType.Boolean,
459
- });
460
- options.addDeclaration({
461
- name: "hideGenerator",
462
- help: () => i18n.help_hideGenerator(),
463
- type: ParameterType.Boolean,
464
- });
465
- options.addDeclaration({
466
- name: "customFooterHtml",
467
- help: () => i18n.help_customFooterHtml(),
468
- type: ParameterType.String,
469
- });
470
- options.addDeclaration({
471
- name: "customFooterHtmlDisableWrapper",
472
- help: () => i18n.help_customFooterHtmlDisableWrapper(),
473
- type: ParameterType.Boolean,
474
- });
475
- options.addDeclaration({
476
- name: "cacheBust",
477
- help: () => i18n.help_cacheBust(),
478
- type: ParameterType.Boolean,
479
- });
480
- options.addDeclaration({
481
- name: "searchInComments",
482
- help: () => i18n.help_searchInComments(),
483
- type: ParameterType.Boolean,
484
- });
485
- options.addDeclaration({
486
- name: "searchInDocuments",
487
- help: () => i18n.help_searchInDocuments(),
488
- type: ParameterType.Boolean,
489
- });
490
- options.addDeclaration({
491
- name: "cleanOutputDir",
492
- help: () => i18n.help_cleanOutputDir(),
493
- type: ParameterType.Boolean,
494
- defaultValue: true,
495
- });
496
- options.addDeclaration({
497
- name: "titleLink",
498
- help: () => i18n.help_titleLink(),
499
- type: ParameterType.String,
500
- });
501
- options.addDeclaration({
502
- name: "navigationLinks",
503
- help: () => i18n.help_navigationLinks(),
504
- type: ParameterType.Mixed,
505
- defaultValue: {},
506
- validate(value) {
507
- if (!isObject(value)) {
508
- throw new Error(i18n.option_0_must_be_object_with_urls("navigationLinks"));
509
- }
510
- if (Object.values(value).some((x) => typeof x !== "string")) {
511
- throw new Error(i18n.option_0_must_be_object_with_urls("navigationLinks"));
512
- }
513
- },
514
- });
515
- options.addDeclaration({
516
- name: "sidebarLinks",
517
- help: () => i18n.help_sidebarLinks(),
518
- type: ParameterType.Mixed,
519
- defaultValue: {},
520
- validate(value) {
521
- if (!isObject(value)) {
522
- throw new Error(i18n.option_0_must_be_object_with_urls("sidebarLinks"));
523
- }
524
- if (Object.values(value).some((x) => typeof x !== "string")) {
525
- throw new Error(i18n.option_0_must_be_object_with_urls("sidebarLinks"));
526
- }
527
- },
528
- });
529
- options.addDeclaration({
530
- name: "navigationLeaves",
531
- help: () => i18n.help_navigationLeaves(),
532
- type: ParameterType.Array,
533
- });
534
- options.addDeclaration({
535
- name: "navigation",
536
- help: () => i18n.help_navigation(),
537
- type: ParameterType.Flags,
538
- defaults: {
539
- includeCategories: false,
540
- includeGroups: false,
541
- includeFolders: true,
542
- compactFolders: true,
543
- excludeReferences: false,
544
- },
545
- });
546
- options.addDeclaration({
547
- name: "headings",
548
- help: () => i18n.help_headings(),
549
- type: ParameterType.Flags,
550
- defaults: {
551
- readme: true,
552
- document: false,
553
- },
554
- });
555
- options.addDeclaration({
556
- name: "sluggerConfiguration",
557
- help: () => i18n.help_sluggerConfiguration(),
558
- type: ParameterType.Flags,
559
- defaults: {
560
- lowercase: true,
561
- },
562
- });
563
- options.addDeclaration({
564
- name: "includeHierarchySummary",
565
- help: () => i18n.help_includeHierarchySummary(),
566
- type: ParameterType.Boolean,
567
- defaultValue: true,
568
- });
569
- options.addDeclaration({
570
- name: "visibilityFilters",
571
- help: () => i18n.help_visibilityFilters(),
572
- type: ParameterType.Mixed,
573
- configFileOnly: true,
574
- defaultValue: {
575
- protected: false,
576
- private: false,
577
- inherited: true,
578
- external: false,
579
- },
580
- validate(value) {
581
- const knownKeys = ["protected", "private", "inherited", "external"];
582
- if (typeof value !== "object" || !value) {
583
- throw new Error(i18n.option_0_must_be_an_object("visibilityFilters"));
584
- }
585
- for (const [key, val] of Object.entries(value)) {
586
- if (!key.startsWith("@") && !knownKeys.includes(key)) {
587
- throw new Error(i18n.visibility_filters_only_include_0(knownKeys.join(", ")));
588
- }
589
- if (typeof val !== "boolean") {
590
- throw new Error(i18n.visibility_filters_must_be_booleans());
591
- }
592
- }
593
- },
594
- });
595
- options.addDeclaration({
596
- name: "searchCategoryBoosts",
597
- help: () => i18n.help_searchCategoryBoosts(),
598
- type: ParameterType.Mixed,
599
- configFileOnly: true,
600
- defaultValue: {},
601
- validate(value) {
602
- if (!isObject(value)) {
603
- throw new Error(i18n.option_0_must_be_an_object("searchCategoryBoosts"));
604
- }
605
- if (Object.values(value).some((x) => typeof x !== "number")) {
606
- throw new Error(i18n.option_0_values_must_be_numbers("searchCategoryBoosts"));
607
- }
608
- },
609
- });
610
- options.addDeclaration({
611
- name: "searchGroupBoosts",
612
- help: () => i18n.help_searchGroupBoosts(),
613
- type: ParameterType.Mixed,
614
- configFileOnly: true,
615
- defaultValue: {},
616
- validate(value) {
617
- if (!isObject(value)) {
618
- throw new Error(i18n.option_0_must_be_an_object("searchGroupBoosts"));
619
- }
620
- if (Object.values(value).some((x) => typeof x !== "number")) {
621
- throw new Error(i18n.option_0_values_must_be_numbers("searchGroupBoosts"));
622
- }
623
- },
624
- });
625
- options.addDeclaration({
626
- name: "useFirstParagraphOfCommentAsSummary",
627
- help: () => i18n.help_useFirstParagraphOfCommentAsSummary(),
628
- type: ParameterType.Boolean,
629
- });
630
- // MARK: Comment Options
631
- options.addDeclaration({
632
- name: "jsDocCompatibility",
633
- help: () => i18n.help_jsDocCompatibility(),
634
- type: ParameterType.Flags,
635
- defaults: {
636
- defaultTag: true,
637
- exampleTag: true,
638
- inheritDocTag: true,
639
- ignoreUnescapedBraces: true,
640
- },
641
- });
642
- options.addDeclaration({
643
- name: "suppressCommentWarningsInDeclarationFiles",
644
- help: () => i18n.help_suppressCommentWarningsInDeclarationFiles(),
645
- type: ParameterType.Boolean,
646
- defaultValue: true,
647
- });
648
- options.addDeclaration({
649
- name: "commentStyle",
650
- help: () => i18n.help_commentStyle(),
651
- type: ParameterType.Map,
652
- map: CommentStyle,
653
- defaultValue: CommentStyle.JSDoc,
654
- });
655
- options.addDeclaration({
656
- name: "useTsLinkResolution",
657
- help: () => i18n.help_useTsLinkResolution(),
658
- type: ParameterType.Boolean,
659
- defaultValue: true,
660
- });
661
- options.addDeclaration({
662
- name: "preserveLinkText",
663
- help: () => i18n.help_preserveLinkText(),
664
- type: ParameterType.Boolean,
665
- defaultValue: true,
666
- });
667
- options.addDeclaration({
668
- name: "blockTags",
669
- help: () => i18n.help_blockTags(),
670
- type: ParameterType.Array,
671
- defaultValue: blockTags,
672
- validate: makeTagArrayValidator("blockTags"),
673
- });
674
- options.addDeclaration({
675
- name: "inlineTags",
676
- help: () => i18n.help_inlineTags(),
677
- type: ParameterType.Array,
678
- defaultValue: inlineTags,
679
- validate: makeTagArrayValidator("inlineTags"),
680
- });
681
- options.addDeclaration({
682
- name: "modifierTags",
683
- help: () => i18n.help_modifierTags(),
684
- type: ParameterType.Array,
685
- defaultValue: modifierTags,
686
- validate: makeTagArrayValidator("modifierTags"),
687
- });
688
- options.addDeclaration({
689
- name: "excludeTags",
690
- help: () => i18n.help_excludeTags(),
691
- type: ParameterType.Array,
692
- defaultValue: OptionDefaults.excludeTags,
693
- validate: makeTagArrayValidator("excludeTags"),
694
- });
695
- options.addDeclaration({
696
- name: "notRenderedTags",
697
- help: () => i18n.help_notRenderedTags(),
698
- type: ParameterType.Array,
699
- defaultValue: OptionDefaults.notRenderedTags,
700
- validate: makeTagArrayValidator("notRenderedTags"),
701
- });
702
- options.addDeclaration({
703
- name: "cascadedModifierTags",
704
- help: () => i18n.help_cascadedModifierTags(),
705
- type: ParameterType.Array,
706
- defaultValue: OptionDefaults.cascadedModifierTags,
707
- validate: makeTagArrayValidator("cascadedModifierTags"),
708
- });
709
- options.addDeclaration({
710
- name: "preservedTypeAnnotationTags",
711
- help: () => i18n.help_preservedTypeAnnotationTags(),
712
- type: ParameterType.Array,
713
- defaultValue: OptionDefaults.preservedTypeAnnotationTags,
714
- validate: makeTagArrayValidator("preservedTypeAnnotationTags"),
715
- });
716
- // MARK: Organization Options
717
- options.addDeclaration({
718
- name: "categorizeByGroup",
719
- help: () => i18n.help_categorizeByGroup(),
720
- type: ParameterType.Boolean,
721
- defaultValue: false,
722
- });
723
- options.addDeclaration({
724
- name: "groupReferencesByType",
725
- help: () => i18n.help_groupReferencesByType(),
726
- type: ParameterType.Boolean,
727
- defaultValue: false,
728
- });
729
- options.addDeclaration({
730
- name: "defaultCategory",
731
- help: () => i18n.help_defaultCategory(),
732
- defaultValue: "Other",
733
- });
734
- options.addDeclaration({
735
- name: "categoryOrder",
736
- help: () => i18n.help_categoryOrder(),
737
- type: ParameterType.Array,
738
- });
739
- options.addDeclaration({
740
- name: "groupOrder",
741
- help: () => i18n.help_groupOrder(),
742
- type: ParameterType.Array,
743
- // default order specified in GroupPlugin to correctly handle localization.
744
- });
745
- options.addDeclaration({
746
- name: "sort",
747
- help: () => i18n.help_sort(),
748
- type: ParameterType.Array,
749
- defaultValue: OptionDefaults.sort,
750
- validate(value) {
751
- const invalid = setDifference(value, SORT_STRATEGIES);
752
- if (invalid.size !== 0) {
753
- throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("sort", Array.from(invalid).join(", "), SORT_STRATEGIES.join(", ")));
754
- }
755
- },
756
- });
757
- options.addDeclaration({
758
- name: "sortEntryPoints",
759
- help: () => i18n.help_sortEntryPoints(),
760
- type: ParameterType.Boolean,
761
- defaultValue: true,
762
- });
763
- options.addDeclaration({
764
- name: "kindSortOrder",
765
- help: () => i18n.help_kindSortOrder(),
766
- type: ParameterType.Array,
767
- defaultValue: [],
768
- validate(value) {
769
- const invalid = setDifference(value, getEnumKeys(ReflectionKind));
770
- if (invalid.size !== 0) {
771
- throw new Error(i18n.option_0_specified_1_but_only_2_is_valid(`kindSortOrder`, Array.from(invalid).join(", "), getEnumKeys(ReflectionKind).join(", ")));
772
- }
773
- },
774
- });
775
- // MARK: General Options
776
- options.addDeclaration({
777
- name: "watch",
778
- help: () => i18n.help_watch(),
779
- type: ParameterType.Boolean,
780
- });
781
- options.addDeclaration({
782
- name: "preserveWatchOutput",
783
- help: () => i18n.help_preserveWatchOutput(),
784
- type: ParameterType.Boolean,
785
- });
786
- options.addDeclaration({
787
- name: "skipErrorChecking",
788
- help: () => i18n.help_skipErrorChecking(),
789
- type: ParameterType.Boolean,
790
- defaultValue: false,
791
- });
792
- options.addDeclaration({
793
- name: "help",
794
- help: () => i18n.help_help(),
795
- type: ParameterType.Boolean,
796
- });
797
- options.addDeclaration({
798
- name: "version",
799
- help: () => i18n.help_version(),
800
- type: ParameterType.Boolean,
801
- });
802
- options.addDeclaration({
803
- name: "showConfig",
804
- help: () => i18n.help_showConfig(),
805
- type: ParameterType.Boolean,
806
- });
807
- options.addDeclaration({
808
- name: "plugin",
809
- help: () => i18n.help_plugin(),
810
- type: ParameterType.PluginArray,
811
- });
812
- options.addDeclaration({
813
- name: "logLevel",
814
- help: () => i18n.help_logLevel(),
815
- type: ParameterType.Map,
816
- map: LogLevel,
817
- defaultValue: LogLevel.Info,
818
- });
819
- options.addDeclaration({
820
- name: "treatWarningsAsErrors",
821
- help: () => i18n.help_treatWarningsAsErrors(),
822
- type: ParameterType.Boolean,
823
- });
824
- options.addDeclaration({
825
- name: "treatValidationWarningsAsErrors",
826
- help: () => i18n.help_treatValidationWarningsAsErrors(),
827
- type: ParameterType.Boolean,
828
- });
829
- options.addDeclaration({
830
- name: "intentionallyNotExported",
831
- help: () => i18n.help_intentionallyNotExported(),
832
- type: ParameterType.Array,
833
- });
834
- options.addDeclaration({
835
- name: "requiredToBeDocumented",
836
- help: () => i18n.help_requiredToBeDocumented(),
837
- type: ParameterType.Array,
838
- validate(values) {
839
- // this is good enough because the values of the ReflectionKind enum are all numbers
840
- const validValues = getEnumKeys(ReflectionKind);
841
- for (const kind of values) {
842
- if (!validValues.includes(kind)) {
843
- throw new Error(i18n.option_0_specified_1_but_only_2_is_valid("requiredToBeDocumented", kind, validValues.join(", ")));
844
- }
845
- }
846
- },
847
- defaultValue: OptionDefaults.requiredToBeDocumented,
848
- });
849
- options.addDeclaration({
850
- name: "packagesRequiringDocumentation",
851
- help: () => i18n.help_packagesRequiringDocumentation(),
852
- type: ParameterType.Array,
853
- });
854
- options.addDeclaration({
855
- name: "intentionallyNotDocumented",
856
- help: () => i18n.help_intentionallyNotDocumented(),
857
- type: ParameterType.Array,
858
- defaultValue: [],
859
- });
860
- options.addDeclaration({
861
- name: "validation",
862
- help: () => i18n.help_validation(),
863
- type: ParameterType.Flags,
864
- defaults: {
865
- notExported: true,
866
- invalidLink: true,
867
- invalidPath: true,
868
- rewrittenLink: true,
869
- notDocumented: false,
870
- unusedMergeModuleWith: true,
871
- },
872
- });
873
- }
874
- function isObject(x) {
875
- return !!x && typeof x === "object" && !Array.isArray(x);
876
- }