@depup/typedoc 0.28.17-depup.0

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 (390) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +34 -0
  3. package/bin/package.json +3 -0
  4. package/bin/typedoc +24 -0
  5. package/changes.json +22 -0
  6. package/dist/browser-locales/de.d.ts +2 -0
  7. package/dist/browser-locales/de.js +62 -0
  8. package/dist/browser-locales/en.d.ts +2 -0
  9. package/dist/browser-locales/en.js +62 -0
  10. package/dist/browser-locales/ja.d.ts +2 -0
  11. package/dist/browser-locales/ja.js +62 -0
  12. package/dist/browser-locales/ko.d.ts +2 -0
  13. package/dist/browser-locales/ko.js +62 -0
  14. package/dist/browser-locales/zh.d.ts +2 -0
  15. package/dist/browser-locales/zh.js +62 -0
  16. package/dist/browser-utils.d.ts +3 -0
  17. package/dist/browser-utils.js +3 -0
  18. package/dist/index.d.ts +49 -0
  19. package/dist/index.js +46 -0
  20. package/dist/lib/application-events.d.ts +5 -0
  21. package/dist/lib/application-events.js +5 -0
  22. package/dist/lib/application.d.ts +195 -0
  23. package/dist/lib/application.js +715 -0
  24. package/dist/lib/cli.d.ts +1 -0
  25. package/dist/lib/cli.js +111 -0
  26. package/dist/lib/converter/comments/blockLexer.d.ts +4 -0
  27. package/dist/lib/converter/comments/blockLexer.js +391 -0
  28. package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +3 -0
  29. package/dist/lib/converter/comments/declarationReferenceResolver.js +218 -0
  30. package/dist/lib/converter/comments/discovery.d.ts +14 -0
  31. package/dist/lib/converter/comments/discovery.js +563 -0
  32. package/dist/lib/converter/comments/index.d.ts +37 -0
  33. package/dist/lib/converter/comments/index.js +241 -0
  34. package/dist/lib/converter/comments/lexer.d.ts +17 -0
  35. package/dist/lib/converter/comments/lexer.js +10 -0
  36. package/dist/lib/converter/comments/lineLexer.d.ts +3 -0
  37. package/dist/lib/converter/comments/lineLexer.js +279 -0
  38. package/dist/lib/converter/comments/linkResolver.d.ts +20 -0
  39. package/dist/lib/converter/comments/linkResolver.js +186 -0
  40. package/dist/lib/converter/comments/parser.d.ts +18 -0
  41. package/dist/lib/converter/comments/parser.js +538 -0
  42. package/dist/lib/converter/comments/rawLexer.d.ts +8 -0
  43. package/dist/lib/converter/comments/rawLexer.js +218 -0
  44. package/dist/lib/converter/comments/tagName.d.ts +8 -0
  45. package/dist/lib/converter/comments/tagName.js +58 -0
  46. package/dist/lib/converter/comments/textParser.d.ts +33 -0
  47. package/dist/lib/converter/comments/textParser.js +372 -0
  48. package/dist/lib/converter/components.d.ts +4 -0
  49. package/dist/lib/converter/components.js +3 -0
  50. package/dist/lib/converter/context.d.ts +101 -0
  51. package/dist/lib/converter/context.js +311 -0
  52. package/dist/lib/converter/convert-expression.d.ts +9 -0
  53. package/dist/lib/converter/convert-expression.js +58 -0
  54. package/dist/lib/converter/converter-events.d.ts +13 -0
  55. package/dist/lib/converter/converter-events.js +13 -0
  56. package/dist/lib/converter/converter.d.ts +238 -0
  57. package/dist/lib/converter/converter.js +705 -0
  58. package/dist/lib/converter/factories/index-signature.d.ts +3 -0
  59. package/dist/lib/converter/factories/index-signature.js +50 -0
  60. package/dist/lib/converter/factories/signature.d.ts +14 -0
  61. package/dist/lib/converter/factories/signature.js +353 -0
  62. package/dist/lib/converter/factories/symbol-id.d.ts +3 -0
  63. package/dist/lib/converter/factories/symbol-id.js +47 -0
  64. package/dist/lib/converter/index.d.ts +5 -0
  65. package/dist/lib/converter/index.js +3 -0
  66. package/dist/lib/converter/jsdoc.d.ts +4 -0
  67. package/dist/lib/converter/jsdoc.js +135 -0
  68. package/dist/lib/converter/plugins/CategoryPlugin.d.ts +48 -0
  69. package/dist/lib/converter/plugins/CategoryPlugin.js +278 -0
  70. package/dist/lib/converter/plugins/CommentPlugin.d.ts +128 -0
  71. package/dist/lib/converter/plugins/CommentPlugin.js +770 -0
  72. package/dist/lib/converter/plugins/GroupPlugin.d.ts +48 -0
  73. package/dist/lib/converter/plugins/GroupPlugin.js +281 -0
  74. package/dist/lib/converter/plugins/ImplementsPlugin.d.ts +42 -0
  75. package/dist/lib/converter/plugins/ImplementsPlugin.js +438 -0
  76. package/dist/lib/converter/plugins/IncludePlugin.d.ts +14 -0
  77. package/dist/lib/converter/plugins/IncludePlugin.js +254 -0
  78. package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +32 -0
  79. package/dist/lib/converter/plugins/InheritDocPlugin.js +220 -0
  80. package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +13 -0
  81. package/dist/lib/converter/plugins/LinkResolverPlugin.js +88 -0
  82. package/dist/lib/converter/plugins/MergeModuleWithPlugin.d.ts +12 -0
  83. package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +50 -0
  84. package/dist/lib/converter/plugins/PackagePlugin.d.ts +31 -0
  85. package/dist/lib/converter/plugins/PackagePlugin.js +188 -0
  86. package/dist/lib/converter/plugins/SourcePlugin.d.ts +36 -0
  87. package/dist/lib/converter/plugins/SourcePlugin.js +215 -0
  88. package/dist/lib/converter/plugins/TypePlugin.d.ts +16 -0
  89. package/dist/lib/converter/plugins/TypePlugin.js +108 -0
  90. package/dist/lib/converter/plugins/index.d.ts +10 -0
  91. package/dist/lib/converter/plugins/index.js +10 -0
  92. package/dist/lib/converter/symbols.d.ts +3 -0
  93. package/dist/lib/converter/symbols.js +861 -0
  94. package/dist/lib/converter/types.d.ts +10 -0
  95. package/dist/lib/converter/types.js +833 -0
  96. package/dist/lib/converter/utils/nodes.d.ts +7 -0
  97. package/dist/lib/converter/utils/nodes.js +26 -0
  98. package/dist/lib/converter/utils/reflections.d.ts +2 -0
  99. package/dist/lib/converter/utils/reflections.js +17 -0
  100. package/dist/lib/converter/utils/repository.d.ts +96 -0
  101. package/dist/lib/converter/utils/repository.js +295 -0
  102. package/dist/lib/converter/utils/symbols.d.ts +2 -0
  103. package/dist/lib/converter/utils/symbols.js +12 -0
  104. package/dist/lib/debug/index.d.ts +2 -0
  105. package/dist/lib/debug/index.js +2 -0
  106. package/dist/lib/debug/reflectionLifetimes.d.ts +3 -0
  107. package/dist/lib/debug/reflectionLifetimes.js +27 -0
  108. package/dist/lib/debug/rendererUrls.d.ts +6 -0
  109. package/dist/lib/debug/rendererUrls.js +68 -0
  110. package/dist/lib/internationalization/index.d.ts +7 -0
  111. package/dist/lib/internationalization/index.js +7 -0
  112. package/dist/lib/internationalization/internationalization.d.ts +65 -0
  113. package/dist/lib/internationalization/internationalization.js +64 -0
  114. package/dist/lib/internationalization/locale-utils.cjs +8 -0
  115. package/dist/lib/internationalization/locale-utils.d.cts +8 -0
  116. package/dist/lib/internationalization/locales/de.cjs +401 -0
  117. package/dist/lib/internationalization/locales/de.d.cts +368 -0
  118. package/dist/lib/internationalization/locales/en.cjs +411 -0
  119. package/dist/lib/internationalization/locales/en.d.cts +380 -0
  120. package/dist/lib/internationalization/locales/ja.cjs +320 -0
  121. package/dist/lib/internationalization/locales/ja.d.cts +307 -0
  122. package/dist/lib/internationalization/locales/ko.cjs +233 -0
  123. package/dist/lib/internationalization/locales/ko.d.cts +221 -0
  124. package/dist/lib/internationalization/locales/zh.cjs +488 -0
  125. package/dist/lib/internationalization/locales/zh.d.cts +452 -0
  126. package/dist/lib/internationalization/translatable.d.ts +21 -0
  127. package/dist/lib/internationalization/translatable.js +8 -0
  128. package/dist/lib/models/Comment.d.ts +241 -0
  129. package/dist/lib/models/Comment.js +534 -0
  130. package/dist/lib/models/ContainerReflection.d.ts +56 -0
  131. package/dist/lib/models/ContainerReflection.js +159 -0
  132. package/dist/lib/models/DeclarationReflection.d.ts +149 -0
  133. package/dist/lib/models/DeclarationReflection.js +287 -0
  134. package/dist/lib/models/DocumentReflection.d.ts +32 -0
  135. package/dist/lib/models/DocumentReflection.js +66 -0
  136. package/dist/lib/models/FileRegistry.d.ts +46 -0
  137. package/dist/lib/models/FileRegistry.js +133 -0
  138. package/dist/lib/models/ParameterReflection.d.ts +21 -0
  139. package/dist/lib/models/ParameterReflection.js +39 -0
  140. package/dist/lib/models/ProjectReflection.d.ts +112 -0
  141. package/dist/lib/models/ProjectReflection.js +417 -0
  142. package/dist/lib/models/ReferenceReflection.d.ts +49 -0
  143. package/dist/lib/models/ReferenceReflection.js +85 -0
  144. package/dist/lib/models/Reflection.d.ts +229 -0
  145. package/dist/lib/models/Reflection.js +495 -0
  146. package/dist/lib/models/ReflectionCategory.d.ts +31 -0
  147. package/dist/lib/models/ReflectionCategory.js +56 -0
  148. package/dist/lib/models/ReflectionGroup.d.ts +38 -0
  149. package/dist/lib/models/ReflectionGroup.js +72 -0
  150. package/dist/lib/models/ReflectionSymbolId.d.ts +63 -0
  151. package/dist/lib/models/ReflectionSymbolId.js +85 -0
  152. package/dist/lib/models/SignatureReflection.d.ts +50 -0
  153. package/dist/lib/models/SignatureReflection.js +96 -0
  154. package/dist/lib/models/SourceReference.d.ts +33 -0
  155. package/dist/lib/models/SourceReference.js +50 -0
  156. package/dist/lib/models/TypeParameterReflection.d.ts +30 -0
  157. package/dist/lib/models/TypeParameterReflection.js +45 -0
  158. package/dist/lib/models/index.d.ts +19 -0
  159. package/dist/lib/models/index.js +19 -0
  160. package/dist/lib/models/kind.d.ts +84 -0
  161. package/dist/lib/models/kind.js +231 -0
  162. package/dist/lib/models/types.d.ts +553 -0
  163. package/dist/lib/models/types.js +1296 -0
  164. package/dist/lib/models/utils.d.ts +1 -0
  165. package/dist/lib/models/utils.js +26 -0
  166. package/dist/lib/models/variant.d.ts +21 -0
  167. package/dist/lib/models/variant.js +1 -0
  168. package/dist/lib/output/components.d.ts +53 -0
  169. package/dist/lib/output/components.js +133 -0
  170. package/dist/lib/output/events.d.ts +175 -0
  171. package/dist/lib/output/events.js +195 -0
  172. package/dist/lib/output/formatter.d.ts +88 -0
  173. package/dist/lib/output/formatter.js +660 -0
  174. package/dist/lib/output/index.d.ts +9 -0
  175. package/dist/lib/output/index.js +7 -0
  176. package/dist/lib/output/output.d.ts +14 -0
  177. package/dist/lib/output/output.js +92 -0
  178. package/dist/lib/output/plugins/AssetsPlugin.d.ts +20 -0
  179. package/dist/lib/output/plugins/AssetsPlugin.js +160 -0
  180. package/dist/lib/output/plugins/HierarchyPlugin.d.ts +7 -0
  181. package/dist/lib/output/plugins/HierarchyPlugin.js +65 -0
  182. package/dist/lib/output/plugins/IconsPlugin.d.ts +12 -0
  183. package/dist/lib/output/plugins/IconsPlugin.js +54 -0
  184. package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +22 -0
  185. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +222 -0
  186. package/dist/lib/output/plugins/NavigationPlugin.d.ts +7 -0
  187. package/dist/lib/output/plugins/NavigationPlugin.js +23 -0
  188. package/dist/lib/output/plugins/SitemapPlugin.d.ts +8 -0
  189. package/dist/lib/output/plugins/SitemapPlugin.js +82 -0
  190. package/dist/lib/output/plugins/index.d.ts +7 -0
  191. package/dist/lib/output/plugins/index.js +7 -0
  192. package/dist/lib/output/renderer.d.ts +227 -0
  193. package/dist/lib/output/renderer.js +387 -0
  194. package/dist/lib/output/router.d.ts +187 -0
  195. package/dist/lib/output/router.js +520 -0
  196. package/dist/lib/output/theme.d.ts +22 -0
  197. package/dist/lib/output/theme.js +17 -0
  198. package/dist/lib/output/themes/MarkedPlugin.d.ts +62 -0
  199. package/dist/lib/output/themes/MarkedPlugin.js +461 -0
  200. package/dist/lib/output/themes/default/DefaultTheme.d.ts +72 -0
  201. package/dist/lib/output/themes/default/DefaultTheme.js +367 -0
  202. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +105 -0
  203. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +151 -0
  204. package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
  205. package/dist/lib/output/themes/default/Slugger.js +60 -0
  206. package/dist/lib/output/themes/default/layouts/default.d.ts +6 -0
  207. package/dist/lib/output/themes/default/layouts/default.js +89 -0
  208. package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +5 -0
  209. package/dist/lib/output/themes/default/partials/anchor-icon.js +9 -0
  210. package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +4 -0
  211. package/dist/lib/output/themes/default/partials/breadcrumb.js +11 -0
  212. package/dist/lib/output/themes/default/partials/comment.d.ts +8 -0
  213. package/dist/lib/output/themes/default/partials/comment.js +80 -0
  214. package/dist/lib/output/themes/default/partials/footer.d.ts +3 -0
  215. package/dist/lib/output/themes/default/partials/footer.js +37 -0
  216. package/dist/lib/output/themes/default/partials/header.d.ts +5 -0
  217. package/dist/lib/output/themes/default/partials/header.js +39 -0
  218. package/dist/lib/output/themes/default/partials/hierarchy.d.ts +4 -0
  219. package/dist/lib/output/themes/default/partials/hierarchy.js +32 -0
  220. package/dist/lib/output/themes/default/partials/icon.d.ts +20 -0
  221. package/dist/lib/output/themes/default/partials/icon.js +101 -0
  222. package/dist/lib/output/themes/default/partials/index.d.ts +4 -0
  223. package/dist/lib/output/themes/default/partials/index.js +24 -0
  224. package/dist/lib/output/themes/default/partials/member.d.ts +4 -0
  225. package/dist/lib/output/themes/default/partials/member.declaration.d.ts +4 -0
  226. package/dist/lib/output/themes/default/partials/member.declaration.js +35 -0
  227. package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +4 -0
  228. package/dist/lib/output/themes/default/partials/member.getterSetter.js +12 -0
  229. package/dist/lib/output/themes/default/partials/member.js +36 -0
  230. package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +6 -0
  231. package/dist/lib/output/themes/default/partials/member.signature.body.js +33 -0
  232. package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +5 -0
  233. package/dist/lib/output/themes/default/partials/member.signature.title.js +9 -0
  234. package/dist/lib/output/themes/default/partials/member.signatures.d.ts +4 -0
  235. package/dist/lib/output/themes/default/partials/member.signatures.js +9 -0
  236. package/dist/lib/output/themes/default/partials/member.sources.d.ts +4 -0
  237. package/dist/lib/output/themes/default/partials/member.sources.js +55 -0
  238. package/dist/lib/output/themes/default/partials/members.d.ts +4 -0
  239. package/dist/lib/output/themes/default/partials/members.js +17 -0
  240. package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
  241. package/dist/lib/output/themes/default/partials/moduleReflection.js +68 -0
  242. package/dist/lib/output/themes/default/partials/navigation.d.ts +10 -0
  243. package/dist/lib/output/themes/default/partials/navigation.js +144 -0
  244. package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +4 -0
  245. package/dist/lib/output/themes/default/partials/reflectionPreview.js +26 -0
  246. package/dist/lib/output/themes/default/partials/toolbar.d.ts +5 -0
  247. package/dist/lib/output/themes/default/partials/toolbar.js +13 -0
  248. package/dist/lib/output/themes/default/partials/type.d.ts +5 -0
  249. package/dist/lib/output/themes/default/partials/type.js +9 -0
  250. package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +4 -0
  251. package/dist/lib/output/themes/default/partials/typeAndParent.js +28 -0
  252. package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
  253. package/dist/lib/output/themes/default/partials/typeDetails.js +284 -0
  254. package/dist/lib/output/themes/default/partials/typeParameters.d.ts +4 -0
  255. package/dist/lib/output/themes/default/partials/typeParameters.js +26 -0
  256. package/dist/lib/output/themes/default/templates/document.d.ts +5 -0
  257. package/dist/lib/output/themes/default/templates/document.js +3 -0
  258. package/dist/lib/output/themes/default/templates/hierarchy.d.ts +5 -0
  259. package/dist/lib/output/themes/default/templates/hierarchy.js +31 -0
  260. package/dist/lib/output/themes/default/templates/index.d.ts +5 -0
  261. package/dist/lib/output/themes/default/templates/index.js +3 -0
  262. package/dist/lib/output/themes/default/templates/reflection.d.ts +5 -0
  263. package/dist/lib/output/themes/default/templates/reflection.js +53 -0
  264. package/dist/lib/output/themes/lib.d.ts +44 -0
  265. package/dist/lib/output/themes/lib.js +218 -0
  266. package/dist/lib/serialization/components.d.ts +22 -0
  267. package/dist/lib/serialization/components.js +1 -0
  268. package/dist/lib/serialization/deserializer.d.ts +70 -0
  269. package/dist/lib/serialization/deserializer.js +235 -0
  270. package/dist/lib/serialization/events.d.ts +17 -0
  271. package/dist/lib/serialization/events.js +18 -0
  272. package/dist/lib/serialization/index.d.ts +5 -0
  273. package/dist/lib/serialization/index.js +4 -0
  274. package/dist/lib/serialization/schema.d.ts +283 -0
  275. package/dist/lib/serialization/schema.js +32 -0
  276. package/dist/lib/serialization/serializer.d.ts +52 -0
  277. package/dist/lib/serialization/serializer.js +65 -0
  278. package/dist/lib/utils/ValidatingFileRegistry.d.ts +12 -0
  279. package/dist/lib/utils/ValidatingFileRegistry.js +52 -0
  280. package/dist/lib/utils/component.d.ts +38 -0
  281. package/dist/lib/utils/component.js +41 -0
  282. package/dist/lib/utils/compress.d.ts +7 -0
  283. package/dist/lib/utils/compress.js +13 -0
  284. package/dist/lib/utils/declaration-maps.d.ts +3 -0
  285. package/dist/lib/utils/declaration-maps.js +51 -0
  286. package/dist/lib/utils/entry-point.d.ts +50 -0
  287. package/dist/lib/utils/entry-point.js +330 -0
  288. package/dist/lib/utils/fs.d.ts +65 -0
  289. package/dist/lib/utils/fs.js +372 -0
  290. package/dist/lib/utils/general.d.ts +4 -0
  291. package/dist/lib/utils/general.js +25 -0
  292. package/dist/lib/utils/highlighter.d.ts +9 -0
  293. package/dist/lib/utils/highlighter.js +150 -0
  294. package/dist/lib/utils/html-entities.d.ts +8926 -0
  295. package/dist/lib/utils/html-entities.js +2329 -0
  296. package/dist/lib/utils/html.d.ts +67 -0
  297. package/dist/lib/utils/html.js +635 -0
  298. package/dist/lib/utils/index.d.ts +17 -0
  299. package/dist/lib/utils/index.js +15 -0
  300. package/dist/lib/utils/loggers.d.ts +10 -0
  301. package/dist/lib/utils/loggers.js +71 -0
  302. package/dist/lib/utils/options/declaration.d.ts +514 -0
  303. package/dist/lib/utils/options/declaration.js +443 -0
  304. package/dist/lib/utils/options/defaults.d.ts +20 -0
  305. package/dist/lib/utils/options/defaults.js +104 -0
  306. package/dist/lib/utils/options/help.d.ts +7 -0
  307. package/dist/lib/utils/options/help.js +63 -0
  308. package/dist/lib/utils/options/index.d.ts +6 -0
  309. package/dist/lib/utils/options/index.js +4 -0
  310. package/dist/lib/utils/options/options.d.ts +199 -0
  311. package/dist/lib/utils/options/options.js +273 -0
  312. package/dist/lib/utils/options/readers/arguments.d.ts +15 -0
  313. package/dist/lib/utils/options/readers/arguments.js +109 -0
  314. package/dist/lib/utils/options/readers/index.d.ts +4 -0
  315. package/dist/lib/utils/options/readers/index.js +4 -0
  316. package/dist/lib/utils/options/readers/package-json.d.ts +9 -0
  317. package/dist/lib/utils/options/readers/package-json.js +40 -0
  318. package/dist/lib/utils/options/readers/tsconfig.d.ts +14 -0
  319. package/dist/lib/utils/options/readers/tsconfig.js +172 -0
  320. package/dist/lib/utils/options/readers/typedoc.d.ts +33 -0
  321. package/dist/lib/utils/options/readers/typedoc.js +136 -0
  322. package/dist/lib/utils/options/sources/index.d.ts +1 -0
  323. package/dist/lib/utils/options/sources/index.js +1 -0
  324. package/dist/lib/utils/options/sources/typedoc.d.ts +2 -0
  325. package/dist/lib/utils/options/sources/typedoc.js +876 -0
  326. package/dist/lib/utils/options/tsdoc-defaults.d.ts +6 -0
  327. package/dist/lib/utils/options/tsdoc-defaults.js +94 -0
  328. package/dist/lib/utils/package-manifest.d.ts +11 -0
  329. package/dist/lib/utils/package-manifest.js +84 -0
  330. package/dist/lib/utils/paths.d.ts +27 -0
  331. package/dist/lib/utils/paths.js +127 -0
  332. package/dist/lib/utils/perf.d.ts +6 -0
  333. package/dist/lib/utils/perf.js +86 -0
  334. package/dist/lib/utils/plugins.d.ts +3 -0
  335. package/dist/lib/utils/plugins.js +61 -0
  336. package/dist/lib/utils/reflections.d.ts +5 -0
  337. package/dist/lib/utils/reflections.js +64 -0
  338. package/dist/lib/utils/sort.d.ts +11 -0
  339. package/dist/lib/utils/sort.js +153 -0
  340. package/dist/lib/utils/tsconfig.d.ts +5 -0
  341. package/dist/lib/utils/tsconfig.js +60 -0
  342. package/dist/lib/utils/tsutils.d.ts +3 -0
  343. package/dist/lib/utils/tsutils.js +23 -0
  344. package/dist/lib/utils-common/array.d.ts +57 -0
  345. package/dist/lib/utils-common/array.js +152 -0
  346. package/dist/lib/utils-common/declarationReference.d.ts +42 -0
  347. package/dist/lib/utils-common/declarationReference.js +341 -0
  348. package/dist/lib/utils-common/enum.d.ts +9 -0
  349. package/dist/lib/utils-common/enum.js +27 -0
  350. package/dist/lib/utils-common/events.d.ts +29 -0
  351. package/dist/lib/utils-common/events.js +49 -0
  352. package/dist/lib/utils-common/general.d.ts +40 -0
  353. package/dist/lib/utils-common/general.js +22 -0
  354. package/dist/lib/utils-common/hooks.d.ts +51 -0
  355. package/dist/lib/utils-common/hooks.js +90 -0
  356. package/dist/lib/utils-common/i18n.d.ts +18 -0
  357. package/dist/lib/utils-common/i18n.js +39 -0
  358. package/dist/lib/utils-common/index.d.ts +16 -0
  359. package/dist/lib/utils-common/index.js +17 -0
  360. package/dist/lib/utils-common/jsx.d.ts +53 -0
  361. package/dist/lib/utils-common/jsx.elements.d.ts +949 -0
  362. package/dist/lib/utils-common/jsx.elements.js +3 -0
  363. package/dist/lib/utils-common/jsx.js +187 -0
  364. package/dist/lib/utils-common/logger.d.ts +97 -0
  365. package/dist/lib/utils-common/logger.js +129 -0
  366. package/dist/lib/utils-common/map.d.ts +23 -0
  367. package/dist/lib/utils-common/map.js +63 -0
  368. package/dist/lib/utils-common/minimalSourceFile.d.ts +12 -0
  369. package/dist/lib/utils-common/minimalSourceFile.js +43 -0
  370. package/dist/lib/utils-common/path.d.ts +42 -0
  371. package/dist/lib/utils-common/path.js +130 -0
  372. package/dist/lib/utils-common/set.d.ts +3 -0
  373. package/dist/lib/utils-common/set.js +23 -0
  374. package/dist/lib/utils-common/string.d.ts +11 -0
  375. package/dist/lib/utils-common/string.js +84 -0
  376. package/dist/lib/utils-common/validation.d.ts +33 -0
  377. package/dist/lib/utils-common/validation.js +50 -0
  378. package/dist/lib/validation/documentation.d.ts +3 -0
  379. package/dist/lib/validation/documentation.js +91 -0
  380. package/dist/lib/validation/exports.d.ts +3 -0
  381. package/dist/lib/validation/exports.js +65 -0
  382. package/dist/lib/validation/links.d.ts +3 -0
  383. package/dist/lib/validation/links.js +78 -0
  384. package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
  385. package/dist/lib/validation/unusedMergeModuleWith.js +12 -0
  386. package/package.json +161 -0
  387. package/static/main.js +58 -0
  388. package/static/style.css +1633 -0
  389. package/tsdoc.json +247 -0
  390. package/typedoc-config.schema.json +941 -0
@@ -0,0 +1,443 @@
1
+ import { isAbsolute, join, resolve } from "path";
2
+ import { i18n, } from "#utils";
3
+ import { createGlobString, normalizePath } from "../paths.js";
4
+ /** @enum */
5
+ export const EmitStrategy = {
6
+ both: "both", // Emit both documentation and JS
7
+ docs: "docs", // Emit documentation, but not JS (default)
8
+ none: "none", // Emit nothing, just convert and run validation
9
+ };
10
+ /**
11
+ * Determines how TypeDoc searches for comments.
12
+ * @enum
13
+ */
14
+ export const CommentStyle = {
15
+ JSDoc: "jsdoc",
16
+ Block: "block",
17
+ Line: "line",
18
+ All: "all",
19
+ };
20
+ /**
21
+ * List of option names which, with `entryPointStrategy` set to `packages`
22
+ * should only be set at the root level.
23
+ */
24
+ export const rootPackageOptions = [
25
+ // Configuration Options
26
+ "plugin",
27
+ // Input Options
28
+ "packageOptions",
29
+ // Output Options
30
+ "outputs",
31
+ "out",
32
+ "html",
33
+ "json",
34
+ "pretty",
35
+ "theme",
36
+ "router",
37
+ "lightHighlightTheme",
38
+ "darkHighlightTheme",
39
+ "highlightLanguages",
40
+ "ignoredHighlightLanguages",
41
+ "typePrintWidth",
42
+ "customCss",
43
+ "customJs",
44
+ "customFooterHtml",
45
+ "customFooterHtmlDisableWrapper",
46
+ "markdownItOptions",
47
+ "markdownItLoader",
48
+ "cname",
49
+ "favicon",
50
+ "sourceLinkExternal",
51
+ "markdownLinkExternal",
52
+ "lang",
53
+ "locales",
54
+ "githubPages",
55
+ "cacheBust",
56
+ "hideGenerator",
57
+ "searchInComments",
58
+ "searchInDocuments",
59
+ "cleanOutputDir",
60
+ "titleLink",
61
+ "navigationLinks",
62
+ "sidebarLinks",
63
+ "navigation",
64
+ "headings",
65
+ "sluggerConfiguration",
66
+ "navigationLeaves",
67
+ "visibilityFilters",
68
+ "searchCategoryBoosts",
69
+ "searchGroupBoosts",
70
+ "hostedBaseUrl",
71
+ "useHostedBaseUrlForAbsoluteLinks",
72
+ "useFirstParagraphOfCommentAsSummary",
73
+ "includeHierarchySummary",
74
+ // Comment Options
75
+ "notRenderedTags",
76
+ // Organization Options
77
+ // Validation Options
78
+ "treatWarningsAsErrors",
79
+ "treatValidationWarningsAsErrors",
80
+ // Other Options
81
+ "watch",
82
+ "preserveWatchOutput",
83
+ "help",
84
+ "version",
85
+ "showConfig",
86
+ "logLevel",
87
+ ];
88
+ export var ParameterHint;
89
+ (function (ParameterHint) {
90
+ ParameterHint[ParameterHint["File"] = 0] = "File";
91
+ ParameterHint[ParameterHint["Directory"] = 1] = "Directory";
92
+ })(ParameterHint || (ParameterHint = {}));
93
+ export var ParameterType;
94
+ (function (ParameterType) {
95
+ ParameterType[ParameterType["String"] = 0] = "String";
96
+ /**
97
+ * Resolved according to the config directory.
98
+ */
99
+ ParameterType[ParameterType["Path"] = 1] = "Path";
100
+ /**
101
+ * Resolved according to the config directory unless it starts with https?://
102
+ */
103
+ ParameterType[ParameterType["UrlOrPath"] = 2] = "UrlOrPath";
104
+ ParameterType[ParameterType["Number"] = 3] = "Number";
105
+ ParameterType[ParameterType["Boolean"] = 4] = "Boolean";
106
+ ParameterType[ParameterType["Map"] = 5] = "Map";
107
+ ParameterType[ParameterType["Mixed"] = 6] = "Mixed";
108
+ ParameterType[ParameterType["Array"] = 7] = "Array";
109
+ /**
110
+ * Resolved according to the config directory.
111
+ */
112
+ ParameterType[ParameterType["PathArray"] = 8] = "PathArray";
113
+ /**
114
+ * Resolved according to the config directory if it starts with `.`
115
+ * @deprecated since 0.28.8, will be removed in 0.29
116
+ */
117
+ ParameterType[ParameterType["ModuleArray"] = 9] = "ModuleArray";
118
+ /**
119
+ * Resolved according to the config directory if it starts with `.`
120
+ * @internal - only intended for use with the plugin option
121
+ */
122
+ ParameterType[ParameterType["PluginArray"] = 10] = "PluginArray";
123
+ /**
124
+ * Relative to the config directory.
125
+ */
126
+ ParameterType[ParameterType["GlobArray"] = 11] = "GlobArray";
127
+ /**
128
+ * An object which partially merges user-set values into the defaults.
129
+ */
130
+ ParameterType[ParameterType["Object"] = 12] = "Object";
131
+ /**
132
+ * An object with true/false flags
133
+ */
134
+ ParameterType[ParameterType["Flags"] = 13] = "Flags";
135
+ })(ParameterType || (ParameterType = {}));
136
+ function toStringArray(value, option) {
137
+ if (Array.isArray(value) && value.every(v => typeof v === "string")) {
138
+ return value;
139
+ }
140
+ else if (typeof value === "string") {
141
+ return [value];
142
+ }
143
+ throw new Error(i18n.option_0_must_be_an_array_of_string(option.name));
144
+ }
145
+ function toStringOrFunctionArray(value, option) {
146
+ if (Array.isArray(value) && value.every(v => typeof v === "string" || typeof v === "function")) {
147
+ return value;
148
+ }
149
+ else if (typeof value === "string") {
150
+ return [value];
151
+ }
152
+ throw new Error(i18n.option_0_must_be_an_array_of_string_or_functions(option.name));
153
+ }
154
+ const converters = {
155
+ [ParameterType.String](value, option) {
156
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
157
+ const stringValue = value == null ? "" : String(value);
158
+ option.validate?.(stringValue);
159
+ return stringValue;
160
+ },
161
+ [ParameterType.Path](value, option, configPath) {
162
+ const stringValue =
163
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
164
+ value == null ? "" : resolve(configPath, String(value));
165
+ option.validate?.(stringValue);
166
+ return normalizePath(stringValue);
167
+ },
168
+ [ParameterType.UrlOrPath](value, option, configPath) {
169
+ // eslint-disable-next-line @typescript-eslint/no-base-to-string
170
+ const stringValue = value == null ? "" : String(value);
171
+ if (/^https?:\/\//i.test(stringValue)) {
172
+ option.validate?.(stringValue);
173
+ return stringValue;
174
+ }
175
+ const resolved = normalizePath(resolve(configPath, stringValue));
176
+ option.validate?.(resolved);
177
+ return resolved;
178
+ },
179
+ [ParameterType.Number](value, option) {
180
+ const numValue = parseInt(String(value), 10) || 0;
181
+ if (!valueIsWithinBounds(numValue, option.minValue, option.maxValue)) {
182
+ throw new Error(getBoundsError(option.name, option.minValue, option.maxValue));
183
+ }
184
+ option.validate?.(numValue);
185
+ return numValue;
186
+ },
187
+ [ParameterType.Boolean](value) {
188
+ return !!value;
189
+ },
190
+ [ParameterType.Array](value, option) {
191
+ const strArrValue = toStringArray(value, option);
192
+ option.validate?.(strArrValue);
193
+ return strArrValue;
194
+ },
195
+ [ParameterType.PathArray](value, option, configPath) {
196
+ const strArrValue = toStringArray(value, option);
197
+ const normalized = strArrValue.map((path) => normalizePath(resolve(configPath, path)));
198
+ option.validate?.(normalized);
199
+ return normalized;
200
+ },
201
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
202
+ [ParameterType.ModuleArray](value, option, configPath) {
203
+ const strArrValue = toStringArray(value, option);
204
+ const resolved = resolveModulePaths(strArrValue, configPath);
205
+ option.validate?.(resolved);
206
+ return resolved;
207
+ },
208
+ [ParameterType.PluginArray](value, option, configPath) {
209
+ const arrayValue = toStringOrFunctionArray(value, option);
210
+ const resolved = arrayValue.map(plugin => typeof plugin === "function" ? plugin : resolveModulePath(plugin, configPath));
211
+ return resolved;
212
+ },
213
+ [ParameterType.GlobArray](value, option, configPath) {
214
+ const toGlobString = (v) => {
215
+ const s = String(v);
216
+ // If the string tries to escape a character which isn't a special
217
+ // glob character, the user probably provided a Windows style path
218
+ // by accident due to shell completion, tell them to either remove
219
+ // the useless escape or switch to Unix path separators.
220
+ if (/\\[^?*()[\]\\{}]/.test(s)) {
221
+ throw new Error(i18n.glob_0_should_use_posix_slash(s));
222
+ }
223
+ return createGlobString(configPath, s);
224
+ };
225
+ const strArrValue = toStringArray(value, option);
226
+ const globs = strArrValue.map(toGlobString);
227
+ option.validate?.(globs);
228
+ return globs;
229
+ },
230
+ [ParameterType.Map](value, option) {
231
+ const key = String(value);
232
+ if (option.map instanceof Map) {
233
+ if (option.map.has(key)) {
234
+ return option.map.get(key);
235
+ }
236
+ else if ([...option.map.values()].includes(value)) {
237
+ return value;
238
+ }
239
+ }
240
+ else if (key in option.map) {
241
+ if (isTsNumericEnum(option.map) && typeof value === "number") {
242
+ return value;
243
+ }
244
+ return option.map[key];
245
+ }
246
+ else if (Object.values(option.map).includes(value)) {
247
+ return value;
248
+ }
249
+ throw new Error(getMapError(option.map, option.name));
250
+ },
251
+ [ParameterType.Mixed](value, option) {
252
+ option.validate?.(value);
253
+ return value;
254
+ },
255
+ [ParameterType.Object](value, option, _configPath, oldValue) {
256
+ option.validate?.(value);
257
+ if (typeof oldValue !== "undefined") {
258
+ value = { ...oldValue, ...value };
259
+ }
260
+ return value;
261
+ },
262
+ [ParameterType.Flags](value, option) {
263
+ if (typeof value === "boolean") {
264
+ value = Object.fromEntries(Object.keys(option.defaults).map((key) => [key, value]));
265
+ }
266
+ if (typeof value !== "object" || value == null) {
267
+ throw new Error(i18n.expected_object_with_flag_values_for_0(option.name));
268
+ }
269
+ const obj = { ...value };
270
+ for (const key of Object.keys(obj)) {
271
+ if (!Object.prototype.hasOwnProperty.call(option.defaults, key)) {
272
+ throw new Error(i18n.flag_0_is_not_valid_for_1_expected_2(key, option.name, Object.keys(option.defaults).join(", ")));
273
+ }
274
+ if (typeof obj[key] !== "boolean") {
275
+ // Explicit null/undefined, switch to default.
276
+ if (obj[key] == null) {
277
+ obj[key] = option.defaults[key];
278
+ }
279
+ else {
280
+ throw new Error(i18n.flag_values_for_0_must_be_booleans(option.name));
281
+ }
282
+ }
283
+ }
284
+ return obj;
285
+ },
286
+ };
287
+ /**
288
+ * The default conversion function used by the Options container. Readers may
289
+ * re-use this conversion function or implement their own. The arguments reader
290
+ * implements its own since 'false' should not be converted to true for a boolean option.
291
+ * @param value The value to convert.
292
+ * @param option The option for which the value should be converted.
293
+ * @returns The result of the conversion. Might be the value or an error.
294
+ */
295
+ export function convert(value, option, configPath, oldValue) {
296
+ const _converters = converters;
297
+ return _converters[option.type ?? ParameterType.String](value, option, configPath, oldValue);
298
+ }
299
+ const defaultGetters = {
300
+ [ParameterType.String](option) {
301
+ return option.defaultValue ?? "";
302
+ },
303
+ [ParameterType.Path](option) {
304
+ const defaultStr = option.defaultValue ?? "";
305
+ if (defaultStr == "") {
306
+ return "";
307
+ }
308
+ return normalizePath(isAbsolute(defaultStr)
309
+ ? defaultStr
310
+ : join(process.cwd(), defaultStr));
311
+ },
312
+ [ParameterType.UrlOrPath](option) {
313
+ const defaultStr = option.defaultValue ?? "";
314
+ if (defaultStr == "") {
315
+ return "";
316
+ }
317
+ if (/^https?:\/\//i.test(defaultStr)) {
318
+ return defaultStr;
319
+ }
320
+ return isAbsolute(defaultStr)
321
+ ? defaultStr
322
+ : join(process.cwd(), defaultStr);
323
+ },
324
+ [ParameterType.Number](option) {
325
+ return option.defaultValue ?? 0;
326
+ },
327
+ [ParameterType.Boolean](option) {
328
+ return option.defaultValue ?? false;
329
+ },
330
+ [ParameterType.Map](option) {
331
+ return option.defaultValue;
332
+ },
333
+ [ParameterType.Mixed](option) {
334
+ return option.defaultValue;
335
+ },
336
+ [ParameterType.Object](option) {
337
+ return option.defaultValue;
338
+ },
339
+ [ParameterType.Array](option) {
340
+ return option.defaultValue?.slice() ?? [];
341
+ },
342
+ [ParameterType.PathArray](option) {
343
+ return (option.defaultValue?.map((value) => normalizePath(resolve(process.cwd(), value))) ?? []);
344
+ },
345
+ // eslint-disable-next-line @typescript-eslint/no-deprecated
346
+ [ParameterType.ModuleArray](option) {
347
+ if (option.defaultValue) {
348
+ return resolveModulePaths(option.defaultValue, process.cwd());
349
+ }
350
+ return [];
351
+ },
352
+ [ParameterType.PluginArray](option) {
353
+ if (option.defaultValue) {
354
+ return resolveModulePaths(option.defaultValue, process.cwd());
355
+ }
356
+ return [];
357
+ },
358
+ [ParameterType.GlobArray](option) {
359
+ return (option.defaultValue ?? []).map(g => createGlobString(normalizePath(process.cwd()), g));
360
+ },
361
+ [ParameterType.Flags](option) {
362
+ return { ...option.defaults };
363
+ },
364
+ };
365
+ export function getDefaultValue(option) {
366
+ const getters = defaultGetters;
367
+ return getters[option.type ?? ParameterType.String](option);
368
+ }
369
+ function resolveModulePaths(modules, configPath) {
370
+ return modules.map(path => resolveModulePath(path, configPath));
371
+ }
372
+ function resolveModulePath(path, configPath) {
373
+ if (path.startsWith(".")) {
374
+ return normalizePath(resolve(configPath, path));
375
+ }
376
+ return normalizePath(path);
377
+ }
378
+ function isTsNumericEnum(map) {
379
+ return Object.values(map).every((key) => map[map[key]] === key);
380
+ }
381
+ /**
382
+ * Returns an error message for a map option, indicating that a given value was not one of the values within the map.
383
+ * @param map The values for the option.
384
+ * @param name The name of the option.
385
+ * @returns The error message.
386
+ */
387
+ function getMapError(map, name) {
388
+ let keys = map instanceof Map ? [...map.keys()] : Object.keys(map);
389
+ // If the map is a TS numeric enum we need to filter out the numeric keys.
390
+ // TS numeric enums have the property that every key maps to a value, which maps back to that key.
391
+ if (!(map instanceof Map) && isTsNumericEnum(map)) {
392
+ // This works because TS enum keys may not be numeric.
393
+ keys = keys.filter((key) => Number.isNaN(parseInt(key, 10)));
394
+ }
395
+ return i18n.option_0_must_be_one_of_1(name, keys.join(", "));
396
+ }
397
+ /**
398
+ * Returns an error message for a value that is out of bounds of the given min and/or max values.
399
+ * @param name The name of the thing the value represents.
400
+ * @param minValue The lower bound of the range of allowed values.
401
+ * @param maxValue The upper bound of the range of allowed values.
402
+ * @returns The error message.
403
+ */
404
+ function getBoundsError(name, minValue, maxValue) {
405
+ if (isFiniteNumber(minValue) && isFiniteNumber(maxValue)) {
406
+ return i18n.option_0_must_be_between_1_and_2(name, String(minValue), String(maxValue));
407
+ }
408
+ else if (isFiniteNumber(minValue)) {
409
+ return i18n.option_0_must_be_equal_to_or_greater_than_1(name, String(minValue));
410
+ }
411
+ else {
412
+ return i18n.option_0_must_be_less_than_or_equal_to_1(name, String(maxValue));
413
+ }
414
+ }
415
+ /**
416
+ * Checks if the given value is a finite number.
417
+ * @param value The value being checked.
418
+ * @returns True, if the value is a finite number, otherwise false.
419
+ */
420
+ function isFiniteNumber(value) {
421
+ return Number.isFinite(value);
422
+ }
423
+ /**
424
+ * Checks if a value is between the bounds of the given min and/or max values.
425
+ * @param value The value being checked.
426
+ * @param minValue The lower bound of the range of allowed values.
427
+ * @param maxValue The upper bound of the range of allowed values.
428
+ * @returns True, if the value is within the given bounds, otherwise false.
429
+ */
430
+ function valueIsWithinBounds(value, minValue, maxValue) {
431
+ if (isFiniteNumber(minValue) && isFiniteNumber(maxValue)) {
432
+ return minValue <= value && value <= maxValue;
433
+ }
434
+ else if (isFiniteNumber(minValue)) {
435
+ return minValue <= value;
436
+ }
437
+ else if (isFiniteNumber(maxValue)) {
438
+ return value <= maxValue;
439
+ }
440
+ else {
441
+ return true;
442
+ }
443
+ }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Defaults values for TypeDoc options
3
+ * @module
4
+ */
5
+ import type { BundledLanguage } from "@gerrit0/mini-shiki";
6
+ import type { EnumKeys, TagString } from "#utils";
7
+ import type { ReflectionKind } from "../../models/index.js";
8
+ export declare const excludeNotDocumentedKinds: readonly EnumKeys<typeof ReflectionKind>[];
9
+ export declare const excludeTags: readonly TagString[];
10
+ export declare const blockTags: readonly TagString[];
11
+ export declare const inlineTags: readonly TagString[];
12
+ export declare const modifierTags: readonly TagString[];
13
+ export declare const cascadedModifierTags: readonly TagString[];
14
+ export declare const preservedTypeAnnotationTags: readonly TagString[];
15
+ export declare const notRenderedTags: readonly TagString[];
16
+ export declare const highlightLanguages: readonly BundledLanguage[];
17
+ export declare const ignoredHighlightLanguages: readonly string[];
18
+ export declare const sort: readonly string[];
19
+ export declare const kindSortOrder: readonly EnumKeys<typeof ReflectionKind>[];
20
+ export declare const requiredToBeDocumented: readonly EnumKeys<typeof ReflectionKind>[];
@@ -0,0 +1,104 @@
1
+ import * as TagDefaults from "./tsdoc-defaults.js";
2
+ export const excludeNotDocumentedKinds = [
3
+ "Module",
4
+ "Namespace",
5
+ "Enum",
6
+ // Not including enum member here by default
7
+ "Variable",
8
+ "Function",
9
+ "Class",
10
+ "Interface",
11
+ "Constructor",
12
+ "Property",
13
+ "Method",
14
+ "CallSignature",
15
+ "IndexSignature",
16
+ "ConstructorSignature",
17
+ "Accessor",
18
+ "GetSignature",
19
+ "SetSignature",
20
+ "TypeAlias",
21
+ "Reference",
22
+ ];
23
+ export const excludeTags = [
24
+ "@override",
25
+ "@virtual",
26
+ "@privateRemarks",
27
+ "@satisfies",
28
+ "@overload",
29
+ "@inline",
30
+ "@inlineType",
31
+ ];
32
+ export const blockTags = TagDefaults.blockTags;
33
+ export const inlineTags = TagDefaults.inlineTags;
34
+ export const modifierTags = TagDefaults.modifierTags;
35
+ export const cascadedModifierTags = [
36
+ "@alpha",
37
+ "@beta",
38
+ "@experimental",
39
+ ];
40
+ export const preservedTypeAnnotationTags = [];
41
+ export const notRenderedTags = [
42
+ "@showCategories",
43
+ "@showGroups",
44
+ "@hideCategories",
45
+ "@hideGroups",
46
+ "@disableGroups",
47
+ "@expand",
48
+ "@preventExpand",
49
+ "@expandType",
50
+ "@summary",
51
+ "@group",
52
+ "@groupDescription",
53
+ "@category",
54
+ "@categoryDescription",
55
+ ];
56
+ export const highlightLanguages = [
57
+ "bash",
58
+ "console",
59
+ "css",
60
+ "html",
61
+ "javascript",
62
+ "json",
63
+ "jsonc",
64
+ "json5",
65
+ "yaml",
66
+ "tsx",
67
+ "typescript",
68
+ ];
69
+ export const ignoredHighlightLanguages = [];
70
+ export const sort = [
71
+ "kind",
72
+ "instance-first",
73
+ "alphabetical-ignoring-documents",
74
+ ];
75
+ export const kindSortOrder = [
76
+ "Document",
77
+ "Project",
78
+ "Module",
79
+ "Namespace",
80
+ "Enum",
81
+ "EnumMember",
82
+ "Class",
83
+ "Interface",
84
+ "TypeAlias",
85
+ "Constructor",
86
+ "Property",
87
+ "Variable",
88
+ "Function",
89
+ "Accessor",
90
+ "Method",
91
+ "Reference",
92
+ ];
93
+ export const requiredToBeDocumented = [
94
+ "Enum",
95
+ "EnumMember",
96
+ "Variable",
97
+ "Function",
98
+ "Class",
99
+ "Interface",
100
+ "Property",
101
+ "Method",
102
+ "Accessor",
103
+ "TypeAlias",
104
+ ];
@@ -0,0 +1,7 @@
1
+ import type { Options } from "./options.js";
2
+ export interface ParameterHelp {
3
+ names: string[];
4
+ helps: string[];
5
+ margin: number;
6
+ }
7
+ export declare function getOptionsHelp(options: Options): string;
@@ -0,0 +1,63 @@
1
+ import { ParameterHint, ParameterType } from "./declaration.js";
2
+ import { getSupportedLanguages, getSupportedThemes } from "../highlighter.js";
3
+ function hasHint(parameter) {
4
+ return ((parameter.type ?? ParameterType.String) === ParameterType.String &&
5
+ "hint" in parameter);
6
+ }
7
+ /**
8
+ * Prepare parameter information for the {@link toString} method.
9
+ *
10
+ * @param scope The scope of the parameters whose help should be returned.
11
+ * @returns The columns and lines for the help of the requested parameters.
12
+ */
13
+ function getParameterHelp(options) {
14
+ const parameters = options.getDeclarations();
15
+ parameters.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: "base" }));
16
+ const names = [];
17
+ const helps = [];
18
+ let margin = 0;
19
+ for (const parameter of parameters) {
20
+ if (!parameter.help || parameter.configFileOnly) {
21
+ continue;
22
+ }
23
+ let name = " --" + parameter.name;
24
+ if (hasHint(parameter)) {
25
+ name += " " + ParameterHint[parameter.hint].toUpperCase();
26
+ }
27
+ names.push(name);
28
+ helps.push(typeof parameter.help === "string"
29
+ ? parameter.help
30
+ : parameter.help());
31
+ margin = Math.max(name.length, margin);
32
+ }
33
+ return { names, helps, margin };
34
+ }
35
+ function toEvenColumns(values, maxLineWidth) {
36
+ const columnWidth = values.reduce((acc, val) => Math.max(acc, val.length), 0) + 2;
37
+ const numColumns = Math.max(1, Math.floor(maxLineWidth / columnWidth));
38
+ let line = "";
39
+ const out = [];
40
+ for (let i = 0; i < values.length; ++i) {
41
+ if (i !== 0 && i % numColumns === 0) {
42
+ out.push(line);
43
+ line = "";
44
+ }
45
+ line += values[i].padEnd(columnWidth);
46
+ }
47
+ if (line != "") {
48
+ out.push(line);
49
+ }
50
+ return out;
51
+ }
52
+ export function getOptionsHelp(options) {
53
+ const output = ["typedoc path/to/entry.ts", "", "Options:"];
54
+ const columns = getParameterHelp(options);
55
+ for (let i = 0; i < columns.names.length; i++) {
56
+ const usage = columns.names[i];
57
+ const description = columns.helps[i];
58
+ output.push(usage.padEnd(columns.margin + 2) + description);
59
+ }
60
+ output.push("", "Supported highlighting languages:", ...toEvenColumns(getSupportedLanguages(), 80));
61
+ output.push("", "Supported highlighting themes:", ...toEvenColumns(getSupportedThemes(), 80));
62
+ return output.join("\n");
63
+ }
@@ -0,0 +1,6 @@
1
+ export { CommentStyle, EmitStrategy, ParameterHint, ParameterType } from "./declaration.js";
2
+ export { Option, Options } from "./options.js";
3
+ export type { OptionsReader } from "./options.js";
4
+ export { ArgumentsReader, PackageJsonReader, TSConfigReader, TypeDocReader } from "./readers/index.js";
5
+ export type { ArrayDeclarationOption, BooleanDeclarationOption, DeclarationOption, DeclarationOptionBase, DeclarationOptionToOptionType, FlagsDeclarationOption, GlobArrayDeclarationOption, JsDocCompatibility, KeyToDeclaration, ManuallyValidatedOption, MapDeclarationOption, MixedDeclarationOption, NumberDeclarationOption, ObjectDeclarationOption, OutputSpecification, ParameterTypeToOptionTypeMap, StringDeclarationOption, TypeDocOptionMap, TypeDocOptions, TypeDocOptionValues, TypeDocPackageOptions, ValidationOptions, } from "./declaration.js";
6
+ export * as OptionDefaults from "./defaults.js";
@@ -0,0 +1,4 @@
1
+ export { CommentStyle, EmitStrategy, ParameterHint, ParameterType } from "./declaration.js";
2
+ export { Option, Options } from "./options.js";
3
+ export { ArgumentsReader, PackageJsonReader, TSConfigReader, TypeDocReader } from "./readers/index.js";
4
+ export * as OptionDefaults from "./defaults.js";