typedoc 0.26.11 → 0.27.0-beta.1

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 (338) hide show
  1. package/bin/package.json +3 -0
  2. package/bin/typedoc +1 -1
  3. package/dist/index.d.ts +23 -13
  4. package/dist/index.js +22 -81
  5. package/dist/lib/application-events.js +1 -4
  6. package/dist/lib/application.d.ts +26 -16
  7. package/dist/lib/application.js +222 -242
  8. package/dist/lib/cli.js +3 -40
  9. package/dist/lib/converter/comments/blockLexer.d.ts +1 -1
  10. package/dist/lib/converter/comments/blockLexer.js +24 -30
  11. package/dist/lib/converter/comments/declarationReference.js +10 -21
  12. package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +2 -2
  13. package/dist/lib/converter/comments/declarationReferenceResolver.js +40 -36
  14. package/dist/lib/converter/comments/discovery.d.ts +4 -4
  15. package/dist/lib/converter/comments/discovery.js +154 -172
  16. package/dist/lib/converter/comments/index.d.ts +4 -4
  17. package/dist/lib/converter/comments/index.js +39 -50
  18. package/dist/lib/converter/comments/lexer.d.ts +1 -1
  19. package/dist/lib/converter/comments/lexer.js +2 -5
  20. package/dist/lib/converter/comments/lineLexer.d.ts +1 -1
  21. package/dist/lib/converter/comments/lineLexer.js +12 -15
  22. package/dist/lib/converter/comments/linkResolver.d.ts +2 -2
  23. package/dist/lib/converter/comments/linkResolver.js +14 -21
  24. package/dist/lib/converter/comments/parser.d.ts +6 -6
  25. package/dist/lib/converter/comments/parser.js +69 -96
  26. package/dist/lib/converter/comments/rawLexer.d.ts +1 -1
  27. package/dist/lib/converter/comments/rawLexer.js +13 -16
  28. package/dist/lib/converter/comments/tagName.js +1 -4
  29. package/dist/lib/converter/comments/textParser.d.ts +4 -4
  30. package/dist/lib/converter/comments/textParser.js +28 -30
  31. package/dist/lib/converter/components.d.ts +2 -3
  32. package/dist/lib/converter/components.js +2 -7
  33. package/dist/lib/converter/context.d.ts +9 -9
  34. package/dist/lib/converter/context.js +54 -44
  35. package/dist/lib/converter/convert-expression.js +16 -23
  36. package/dist/lib/converter/converter-events.d.ts +1 -0
  37. package/dist/lib/converter/converter-events.js +2 -4
  38. package/dist/lib/converter/converter.d.ts +16 -13
  39. package/dist/lib/converter/converter.js +212 -239
  40. package/dist/lib/converter/factories/index-signature.d.ts +3 -3
  41. package/dist/lib/converter/factories/index-signature.js +43 -26
  42. package/dist/lib/converter/factories/signature.d.ts +2 -2
  43. package/dist/lib/converter/factories/signature.js +95 -106
  44. package/dist/lib/converter/index.d.ts +6 -7
  45. package/dist/lib/converter/index.js +3 -11
  46. package/dist/lib/converter/jsdoc.d.ts +1 -1
  47. package/dist/lib/converter/jsdoc.js +34 -41
  48. package/dist/lib/converter/plugins/CategoryPlugin.d.ts +6 -21
  49. package/dist/lib/converter/plugins/CategoryPlugin.js +57 -139
  50. package/dist/lib/converter/plugins/CommentPlugin.d.ts +3 -5
  51. package/dist/lib/converter/plugins/CommentPlugin.js +153 -163
  52. package/dist/lib/converter/plugins/GroupPlugin.d.ts +10 -9
  53. package/dist/lib/converter/plugins/GroupPlugin.js +87 -124
  54. package/dist/lib/converter/plugins/ImplementsPlugin.d.ts +3 -5
  55. package/dist/lib/converter/plugins/ImplementsPlugin.js +255 -321
  56. package/dist/lib/converter/plugins/IncludePlugin.d.ts +11 -0
  57. package/dist/lib/converter/plugins/IncludePlugin.js +72 -0
  58. package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +4 -3
  59. package/dist/lib/converter/plugins/InheritDocPlugin.js +41 -72
  60. package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +5 -5
  61. package/dist/lib/converter/plugins/LinkResolverPlugin.js +37 -58
  62. package/dist/lib/converter/plugins/MergeModuleWithPlugin.d.ts +12 -0
  63. package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +49 -0
  64. package/dist/lib/converter/plugins/PackagePlugin.d.ts +4 -3
  65. package/dist/lib/converter/plugins/PackagePlugin.js +62 -111
  66. package/dist/lib/converter/plugins/SourcePlugin.d.ts +3 -5
  67. package/dist/lib/converter/plugins/SourcePlugin.js +69 -110
  68. package/dist/lib/converter/plugins/TypePlugin.d.ts +4 -6
  69. package/dist/lib/converter/plugins/TypePlugin.js +95 -158
  70. package/dist/lib/converter/plugins/index.d.ts +10 -9
  71. package/dist/lib/converter/plugins/index.js +10 -21
  72. package/dist/lib/converter/symbols.d.ts +1 -1
  73. package/dist/lib/converter/symbols.js +234 -227
  74. package/dist/lib/converter/types.d.ts +2 -2
  75. package/dist/lib/converter/types.js +252 -237
  76. package/dist/lib/converter/utils/nodes.js +5 -13
  77. package/dist/lib/converter/utils/reflections.d.ts +1 -1
  78. package/dist/lib/converter/utils/reflections.js +4 -7
  79. package/dist/lib/converter/utils/repository.d.ts +1 -1
  80. package/dist/lib/converter/utils/repository.js +103 -97
  81. package/dist/lib/converter/utils/symbols.js +3 -9
  82. package/dist/lib/internationalization/index.d.ts +3 -4
  83. package/dist/lib/internationalization/index.js +3 -8
  84. package/dist/lib/internationalization/internationalization.d.ts +5 -4
  85. package/dist/lib/internationalization/internationalization.js +97 -103
  86. package/dist/lib/internationalization/locale-utils.cjs +8 -0
  87. package/dist/lib/internationalization/locale-utils.d.cts +8 -0
  88. package/dist/lib/internationalization/locales/en.cjs +372 -2
  89. package/dist/lib/internationalization/locales/en.d.cts +343 -2
  90. package/dist/lib/internationalization/locales/jp.cjs +13 -14
  91. package/dist/lib/internationalization/locales/jp.d.cts +307 -1
  92. package/dist/lib/internationalization/locales/ko.cjs +12 -11
  93. package/dist/lib/internationalization/locales/ko.d.cts +221 -1
  94. package/dist/lib/internationalization/locales/zh.cjs +43 -19
  95. package/dist/lib/internationalization/locales/zh.d.cts +409 -1
  96. package/dist/lib/internationalization/translatable.d.ts +4 -327
  97. package/dist/lib/internationalization/translatable.js +2 -360
  98. package/dist/lib/models/FileRegistry.d.ts +20 -9
  99. package/dist/lib/models/FileRegistry.js +54 -45
  100. package/dist/lib/models/ReflectionCategory.d.ts +2 -2
  101. package/dist/lib/models/ReflectionCategory.js +16 -12
  102. package/dist/lib/models/ReflectionGroup.d.ts +3 -3
  103. package/dist/lib/models/ReflectionGroup.js +23 -14
  104. package/dist/lib/models/comments/comment.d.ts +23 -37
  105. package/dist/lib/models/comments/comment.js +388 -325
  106. package/dist/lib/models/comments/index.d.ts +2 -2
  107. package/dist/lib/models/comments/index.js +1 -6
  108. package/dist/lib/models/index.d.ts +7 -7
  109. package/dist/lib/models/index.js +7 -23
  110. package/dist/lib/models/reflections/ReflectionSymbolId.d.ts +2 -2
  111. package/dist/lib/models/reflections/ReflectionSymbolId.js +42 -34
  112. package/dist/lib/models/reflections/abstract.d.ts +17 -20
  113. package/dist/lib/models/reflections/abstract.js +249 -256
  114. package/dist/lib/models/reflections/container.d.ts +7 -7
  115. package/dist/lib/models/reflections/container.js +43 -16
  116. package/dist/lib/models/reflections/declaration.d.ts +15 -12
  117. package/dist/lib/models/reflections/declaration.js +150 -29
  118. package/dist/lib/models/reflections/document.d.ts +3 -3
  119. package/dist/lib/models/reflections/document.js +26 -13
  120. package/dist/lib/models/reflections/index.d.ts +15 -15
  121. package/dist/lib/models/reflections/index.js +12 -31
  122. package/dist/lib/models/reflections/kind.d.ts +1 -1
  123. package/dist/lib/models/reflections/kind.js +3 -6
  124. package/dist/lib/models/reflections/parameter.d.ts +5 -4
  125. package/dist/lib/models/reflections/parameter.js +11 -13
  126. package/dist/lib/models/reflections/project.d.ts +14 -9
  127. package/dist/lib/models/reflections/project.js +104 -56
  128. package/dist/lib/models/reflections/reference.d.ts +3 -3
  129. package/dist/lib/models/reflections/reference.js +6 -9
  130. package/dist/lib/models/reflections/signature.d.ts +8 -8
  131. package/dist/lib/models/reflections/signature.js +35 -14
  132. package/dist/lib/models/reflections/type-parameter.d.ts +5 -5
  133. package/dist/lib/models/reflections/type-parameter.js +9 -10
  134. package/dist/lib/models/reflections/utils.js +1 -4
  135. package/dist/lib/models/reflections/variant.d.ts +8 -7
  136. package/dist/lib/models/reflections/variant.js +1 -2
  137. package/dist/lib/models/sources/file.d.ts +2 -2
  138. package/dist/lib/models/sources/file.js +22 -5
  139. package/dist/lib/models/sources/index.d.ts +1 -1
  140. package/dist/lib/models/sources/index.js +1 -5
  141. package/dist/lib/models/types.d.ts +29 -16
  142. package/dist/lib/models/types.js +236 -151
  143. package/dist/lib/output/components.d.ts +5 -11
  144. package/dist/lib/output/components.js +84 -125
  145. package/dist/lib/output/events.d.ts +3 -3
  146. package/dist/lib/output/events.js +128 -94
  147. package/dist/lib/output/formatter.d.ts +84 -0
  148. package/dist/lib/output/formatter.js +624 -0
  149. package/dist/lib/output/index.d.ts +9 -8
  150. package/dist/lib/output/index.js +7 -19
  151. package/dist/lib/output/models/UrlMapping.d.ts +2 -2
  152. package/dist/lib/output/models/UrlMapping.js +4 -5
  153. package/dist/lib/output/output.d.ts +14 -0
  154. package/dist/lib/output/output.js +91 -0
  155. package/dist/lib/output/plugins/AssetsPlugin.d.ts +9 -8
  156. package/dist/lib/output/plugins/AssetsPlugin.js +64 -80
  157. package/dist/lib/output/plugins/HierarchyPlugin.d.ts +7 -0
  158. package/dist/lib/output/plugins/HierarchyPlugin.js +67 -0
  159. package/dist/lib/output/plugins/IconsPlugin.d.ts +3 -2
  160. package/dist/lib/output/plugins/IconsPlugin.js +28 -84
  161. package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +9 -2
  162. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +90 -96
  163. package/dist/lib/output/plugins/NavigationPlugin.d.ts +3 -2
  164. package/dist/lib/output/plugins/NavigationPlugin.js +22 -102
  165. package/dist/lib/output/plugins/SitemapPlugin.d.ts +3 -2
  166. package/dist/lib/output/plugins/SitemapPlugin.js +60 -120
  167. package/dist/lib/output/plugins/index.d.ts +7 -6
  168. package/dist/lib/output/plugins/index.js +7 -15
  169. package/dist/lib/output/renderer.d.ts +14 -13
  170. package/dist/lib/output/renderer.js +130 -185
  171. package/dist/lib/output/theme.d.ts +9 -5
  172. package/dist/lib/output/theme.js +14 -62
  173. package/dist/lib/output/themes/MarkedPlugin.d.ts +8 -9
  174. package/dist/lib/output/themes/MarkedPlugin.js +152 -117
  175. package/dist/lib/output/themes/default/DefaultTheme.d.ts +17 -29
  176. package/dist/lib/output/themes/default/DefaultTheme.js +334 -310
  177. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +63 -48
  178. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +119 -95
  179. package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
  180. package/dist/lib/output/themes/default/Slugger.js +46 -0
  181. package/dist/lib/output/themes/default/layouts/default.d.ts +5 -5
  182. package/dist/lib/output/themes/default/layouts/default.js +48 -36
  183. package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +2 -2
  184. package/dist/lib/output/themes/default/partials/anchor-icon.js +4 -7
  185. package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +3 -3
  186. package/dist/lib/output/themes/default/partials/breadcrumb.js +4 -8
  187. package/dist/lib/output/themes/default/partials/comment.d.ts +6 -4
  188. package/dist/lib/output/themes/default/partials/comment.js +52 -29
  189. package/dist/lib/output/themes/default/partials/footer.d.ts +2 -2
  190. package/dist/lib/output/themes/default/partials/footer.js +11 -14
  191. package/dist/lib/output/themes/default/partials/header.d.ts +4 -4
  192. package/dist/lib/output/themes/default/partials/header.js +9 -13
  193. package/dist/lib/output/themes/default/partials/hierarchy.d.ts +4 -4
  194. package/dist/lib/output/themes/default/partials/hierarchy.js +12 -15
  195. package/dist/lib/output/themes/default/partials/icon.d.ts +4 -4
  196. package/dist/lib/output/themes/default/partials/icon.js +78 -73
  197. package/dist/lib/output/themes/default/partials/index.d.ts +3 -3
  198. package/dist/lib/output/themes/default/partials/index.js +19 -22
  199. package/dist/lib/output/themes/default/partials/member.d.ts +3 -3
  200. package/dist/lib/output/themes/default/partials/member.declaration.d.ts +3 -3
  201. package/dist/lib/output/themes/default/partials/member.declaration.js +18 -61
  202. package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +3 -3
  203. package/dist/lib/output/themes/default/partials/member.getterSetter.js +10 -26
  204. package/dist/lib/output/themes/default/partials/member.js +19 -24
  205. package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +3 -3
  206. package/dist/lib/output/themes/default/partials/member.signature.body.js +17 -21
  207. package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -7
  208. package/dist/lib/output/themes/default/partials/member.signature.title.js +8 -35
  209. package/dist/lib/output/themes/default/partials/member.signatures.d.ts +3 -3
  210. package/dist/lib/output/themes/default/partials/member.signatures.js +9 -13
  211. package/dist/lib/output/themes/default/partials/member.sources.d.ts +3 -3
  212. package/dist/lib/output/themes/default/partials/member.sources.js +13 -17
  213. package/dist/lib/output/themes/default/partials/members.d.ts +3 -3
  214. package/dist/lib/output/themes/default/partials/members.js +10 -42
  215. package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
  216. package/dist/lib/output/themes/default/partials/moduleReflection.js +62 -0
  217. package/dist/lib/output/themes/default/partials/navigation.d.ts +4 -4
  218. package/dist/lib/output/themes/default/partials/navigation.js +51 -62
  219. package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +3 -3
  220. package/dist/lib/output/themes/default/partials/reflectionPreview.js +12 -15
  221. package/dist/lib/output/themes/default/partials/toolbar.d.ts +4 -4
  222. package/dist/lib/output/themes/default/partials/toolbar.js +16 -20
  223. package/dist/lib/output/themes/default/partials/type.d.ts +4 -6
  224. package/dist/lib/output/themes/default/partials/type.js +8 -388
  225. package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +3 -3
  226. package/dist/lib/output/themes/default/partials/typeAndParent.js +11 -15
  227. package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
  228. package/dist/lib/output/themes/default/partials/typeDetails.js +222 -0
  229. package/dist/lib/output/themes/default/partials/typeParameters.d.ts +3 -3
  230. package/dist/lib/output/themes/default/partials/typeParameters.js +14 -17
  231. package/dist/lib/output/themes/default/templates/document.d.ts +4 -4
  232. package/dist/lib/output/themes/default/templates/document.js +3 -7
  233. package/dist/lib/output/themes/default/templates/hierarchy.d.ts +4 -4
  234. package/dist/lib/output/themes/default/templates/hierarchy.js +24 -22
  235. package/dist/lib/output/themes/default/templates/index.d.ts +4 -4
  236. package/dist/lib/output/themes/default/templates/index.js +3 -7
  237. package/dist/lib/output/themes/default/templates/reflection.d.ts +4 -4
  238. package/dist/lib/output/themes/default/templates/reflection.js +32 -34
  239. package/dist/lib/output/themes/lib.d.ts +17 -3
  240. package/dist/lib/output/themes/lib.js +118 -50
  241. package/dist/lib/serialization/components.d.ts +2 -5
  242. package/dist/lib/serialization/components.js +1 -2
  243. package/dist/lib/serialization/deserializer.d.ts +21 -7
  244. package/dist/lib/serialization/deserializer.js +138 -123
  245. package/dist/lib/serialization/events.d.ts +2 -2
  246. package/dist/lib/serialization/events.js +6 -5
  247. package/dist/lib/serialization/index.d.ts +5 -5
  248. package/dist/lib/serialization/index.js +4 -33
  249. package/dist/lib/serialization/schema.d.ts +8 -2
  250. package/dist/lib/serialization/schema.js +2 -2
  251. package/dist/lib/serialization/serializer.d.ts +11 -5
  252. package/dist/lib/serialization/serializer.js +32 -25
  253. package/dist/lib/utils/array.d.ts +3 -0
  254. package/dist/lib/utils/array.js +26 -27
  255. package/dist/lib/utils/component.d.ts +2 -44
  256. package/dist/lib/utils/component.js +10 -102
  257. package/dist/lib/utils/entry-point.d.ts +3 -4
  258. package/dist/lib/utils/entry-point.js +114 -85
  259. package/dist/lib/utils/enum.js +6 -14
  260. package/dist/lib/utils/events.js +6 -12
  261. package/dist/lib/utils/fs.js +50 -91
  262. package/dist/lib/utils/general.d.ts +2 -1
  263. package/dist/lib/utils/general.js +50 -40
  264. package/dist/lib/utils/highlighter.js +30 -57
  265. package/dist/lib/utils/hooks.js +7 -13
  266. package/dist/lib/utils/html-entities.d.ts +8926 -0
  267. package/dist/lib/utils/html-entities.js +2329 -0
  268. package/dist/lib/utils/html.d.ts +8 -0
  269. package/dist/lib/utils/html.js +81 -34
  270. package/dist/lib/utils/index.d.ts +22 -22
  271. package/dist/lib/utils/index.js +20 -91
  272. package/dist/lib/utils/jsx.d.ts +12 -6
  273. package/dist/lib/utils/jsx.elements.d.ts +1 -1
  274. package/dist/lib/utils/jsx.elements.js +3 -4
  275. package/dist/lib/utils/jsx.js +82 -52
  276. package/dist/lib/utils/loggers.d.ts +3 -3
  277. package/dist/lib/utils/loggers.js +36 -46
  278. package/dist/lib/utils/map.js +6 -13
  279. package/dist/lib/utils/minimalSourceFile.js +5 -7
  280. package/dist/lib/utils/options/declaration.d.ts +35 -7
  281. package/dist/lib/utils/options/declaration.js +20 -22
  282. package/dist/lib/utils/options/defaults.d.ts +3 -2
  283. package/dist/lib/utils/options/defaults.js +18 -38
  284. package/dist/lib/utils/options/help.d.ts +2 -2
  285. package/dist/lib/utils/options/help.js +7 -10
  286. package/dist/lib/utils/options/index.d.ts +6 -6
  287. package/dist/lib/utils/options/index.js +4 -18
  288. package/dist/lib/utils/options/options.d.ts +8 -5
  289. package/dist/lib/utils/options/options.js +47 -71
  290. package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
  291. package/dist/lib/utils/options/readers/arguments.js +15 -17
  292. package/dist/lib/utils/options/readers/index.d.ts +4 -4
  293. package/dist/lib/utils/options/readers/index.js +4 -11
  294. package/dist/lib/utils/options/readers/package-json.d.ts +3 -3
  295. package/dist/lib/utils/options/readers/package-json.js +15 -21
  296. package/dist/lib/utils/options/readers/tsconfig.d.ts +2 -2
  297. package/dist/lib/utils/options/readers/tsconfig.js +54 -63
  298. package/dist/lib/utils/options/readers/typedoc.d.ts +3 -3
  299. package/dist/lib/utils/options/readers/typedoc.js +44 -76
  300. package/dist/lib/utils/options/sources/index.d.ts +1 -1
  301. package/dist/lib/utils/options/sources/index.js +1 -5
  302. package/dist/lib/utils/options/sources/typedoc.d.ts +1 -1
  303. package/dist/lib/utils/options/sources/typedoc.js +232 -196
  304. package/dist/lib/utils/options/tsdoc-defaults.d.ts +3 -3
  305. package/dist/lib/utils/options/tsdoc-defaults.js +16 -12
  306. package/dist/lib/utils/package-manifest.d.ts +1 -1
  307. package/dist/lib/utils/package-manifest.js +15 -19
  308. package/dist/lib/utils/paths.js +9 -15
  309. package/dist/lib/utils/perf.js +6 -11
  310. package/dist/lib/utils/plugins.d.ts +1 -1
  311. package/dist/lib/utils/plugins.js +7 -10
  312. package/dist/lib/utils/reflections.d.ts +1 -1
  313. package/dist/lib/utils/reflections.js +9 -12
  314. package/dist/lib/utils/set.js +2 -6
  315. package/dist/lib/utils/sort.d.ts +3 -3
  316. package/dist/lib/utils/sort.js +20 -24
  317. package/dist/lib/utils/tsconfig.d.ts +1 -1
  318. package/dist/lib/utils/tsconfig.js +13 -21
  319. package/dist/lib/utils/tsutils.d.ts +1 -1
  320. package/dist/lib/utils/tsutils.js +3 -30
  321. package/dist/lib/utils/validation.js +6 -12
  322. package/dist/lib/validation/documentation.d.ts +2 -2
  323. package/dist/lib/validation/documentation.js +26 -29
  324. package/dist/lib/validation/exports.d.ts +2 -2
  325. package/dist/lib/validation/exports.js +9 -11
  326. package/dist/lib/validation/links.d.ts +2 -2
  327. package/dist/lib/validation/links.js +4 -7
  328. package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
  329. package/dist/lib/validation/unusedMergeModuleWith.js +11 -0
  330. package/package.json +17 -14
  331. package/static/main.js +4 -4
  332. package/static/style.css +109 -17
  333. package/tsdoc.json +30 -0
  334. package/dist/lib/output/themes/default/partials/member.reference.d.ts +0 -4
  335. package/dist/lib/output/themes/default/partials/member.reference.js +0 -30
  336. package/dist/lib/output/themes/default/partials/parameter.d.ts +0 -4
  337. package/dist/lib/output/themes/default/partials/parameter.js +0 -79
  338. package/dist/lib/utils/html-entities.json +0 -2326
@@ -1,5 +1,5 @@
1
- export type { SerializerComponent } from "./components";
2
- export { Deserializer, type Deserializable, type DeserializerComponent, } from "./deserializer";
3
- export { SerializeEvent } from "./events";
4
- export * as JSONOutput from "./schema";
5
- export { Serializer, type SerializerEvents } from "./serializer";
1
+ export type { SerializerComponent } from "./components.js";
2
+ export { Deserializer, type Deserializable, type DeserializerComponent, } from "./deserializer.js";
3
+ export { SerializeEvent } from "./events.js";
4
+ export * as JSONOutput from "./schema.js";
5
+ export { Serializer, type SerializerEvents } from "./serializer.js";
@@ -1,33 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Serializer = exports.JSONOutput = exports.SerializeEvent = exports.Deserializer = void 0;
27
- var deserializer_1 = require("./deserializer");
28
- Object.defineProperty(exports, "Deserializer", { enumerable: true, get: function () { return deserializer_1.Deserializer; } });
29
- var events_1 = require("./events");
30
- Object.defineProperty(exports, "SerializeEvent", { enumerable: true, get: function () { return events_1.SerializeEvent; } });
31
- exports.JSONOutput = __importStar(require("./schema"));
32
- var serializer_1 = require("./serializer");
33
- Object.defineProperty(exports, "Serializer", { enumerable: true, get: function () { return serializer_1.Serializer; } });
1
+ export { Deserializer, } from "./deserializer.js";
2
+ export { SerializeEvent } from "./events.js";
3
+ export * as JSONOutput from "./schema.js";
4
+ export { Serializer } from "./serializer.js";
@@ -25,10 +25,11 @@
25
25
  * ```
26
26
  *
27
27
  * For documentation on the JSON output properties, view the corresponding model.
28
+ * @summary Contains interfaces which describe the JSON output.
28
29
  * @module
29
30
  */
30
- import type * as M from "../models";
31
- import type { IfInternal } from "../utils";
31
+ import type * as M from "../models/index.js";
32
+ import type { IfInternal } from "../utils/index.js";
32
33
  /**
33
34
  * Describes the mapping from Model types to the corresponding JSON output type.
34
35
  */
@@ -170,6 +171,7 @@ export interface ReferenceType extends Type, S<M.ReferenceType, "type" | "name"
170
171
  qualifiedName?: string;
171
172
  refersToTypeParameter?: boolean;
172
173
  preferValues?: boolean;
174
+ highlightedProperties?: Record<string, CommentDisplayPart[]>;
173
175
  }
174
176
  /** @category Types */
175
177
  export interface ReflectionType extends Type, S<M.ReflectionType, "type" | "declaration"> {
@@ -258,6 +260,10 @@ export interface RelativeLinkDisplayPart {
258
260
  * File ID, if present
259
261
  */
260
262
  target?: number;
263
+ /**
264
+ * Anchor within the target file, if present
265
+ */
266
+ targetAnchor?: string;
261
267
  }
262
268
  export interface SourceReference extends S<M.SourceReference, "fileName" | "line" | "character" | "url"> {
263
269
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /**
3
2
  * Contains interfaces which describe the JSON output. Each interface is related to a specific type of serializer.
4
3
  *
@@ -26,6 +25,7 @@
26
25
  * ```
27
26
  *
28
27
  * For documentation on the JSON output properties, view the corresponding model.
28
+ * @summary Contains interfaces which describe the JSON output.
29
29
  * @module
30
30
  */
31
- Object.defineProperty(exports, "__esModule", { value: true });
31
+ export {};
@@ -1,12 +1,18 @@
1
- import { EventDispatcher } from "../utils";
2
- import type { ProjectReflection } from "../models";
3
- import { SerializeEvent } from "./events";
4
- import type { ModelToObject } from "./schema";
5
- import type { SerializerComponent } from "./components";
1
+ import { EventDispatcher } from "../utils/index.js";
2
+ import type { ProjectReflection } from "../models/index.js";
3
+ import { SerializeEvent } from "./events.js";
4
+ import type { ModelToObject } from "./schema.js";
5
+ import type { SerializerComponent } from "./components.js";
6
6
  export interface SerializerEvents {
7
7
  begin: [SerializeEvent];
8
8
  end: [SerializeEvent];
9
9
  }
10
+ /**
11
+ * Serializes TypeDoc's models to JSON
12
+ *
13
+ * @group Common
14
+ * @summary Serializes TypeDoc's models to JSON
15
+ */
10
16
  export declare class Serializer extends EventDispatcher<SerializerEvents> {
11
17
  /**
12
18
  * Triggered when the {@link Serializer} begins transforming a project.
@@ -1,16 +1,34 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Serializer = void 0;
4
- const utils_1 = require("../utils");
5
- const events_1 = require("./events");
6
- const array_1 = require("../utils/array");
7
- class Serializer extends utils_1.EventDispatcher {
8
- constructor() {
9
- super(...arguments);
10
- this.serializers = [];
11
- }
1
+ import { EventDispatcher } from "../utils/index.js";
2
+ import { SerializeEvent } from "./events.js";
3
+ import { insertPrioritySorted } from "../utils/array.js";
4
+ /**
5
+ * Serializes TypeDoc's models to JSON
6
+ *
7
+ * @group Common
8
+ * @summary Serializes TypeDoc's models to JSON
9
+ */
10
+ export class Serializer extends EventDispatcher {
11
+ /**
12
+ * Triggered when the {@link Serializer} begins transforming a project.
13
+ * @event
14
+ */
15
+ static EVENT_BEGIN = "begin";
16
+ /**
17
+ * Triggered when the {@link Serializer} has finished transforming a project.
18
+ * @event
19
+ */
20
+ static EVENT_END = "end";
21
+ serializers = [];
22
+ /**
23
+ * Only set when serializing.
24
+ */
25
+ projectRoot;
26
+ /**
27
+ * Only set when serializing
28
+ */
29
+ project;
12
30
  addSerializer(serializer) {
13
- (0, array_1.insertPrioritySorted)(this.serializers, serializer);
31
+ insertPrioritySorted(this.serializers, serializer);
14
32
  }
15
33
  toObject(value) {
16
34
  if (value === undefined) {
@@ -33,24 +51,13 @@ class Serializer extends utils_1.EventDispatcher {
33
51
  projectToObject(value, projectRoot) {
34
52
  this.projectRoot = projectRoot;
35
53
  this.project = value;
36
- const eventBegin = new events_1.SerializeEvent(value);
54
+ const eventBegin = new SerializeEvent(value);
37
55
  this.trigger(Serializer.EVENT_BEGIN, eventBegin);
38
56
  const project = this.toObject(value);
39
- const eventEnd = new events_1.SerializeEvent(value, project);
57
+ const eventEnd = new SerializeEvent(value, project);
40
58
  this.trigger(Serializer.EVENT_END, eventEnd);
41
59
  this.project = undefined;
42
60
  this.projectRoot = undefined;
43
61
  return project;
44
62
  }
45
63
  }
46
- exports.Serializer = Serializer;
47
- /**
48
- * Triggered when the {@link Serializer} begins transforming a project.
49
- * @event
50
- */
51
- Serializer.EVENT_BEGIN = "begin";
52
- /**
53
- * Triggered when the {@link Serializer} has finished transforming a project.
54
- * @event
55
- */
56
- Serializer.EVENT_END = "end";
@@ -51,3 +51,6 @@ export declare function zip<T extends Iterable<any>[]>(...args: T): Iterable<{
51
51
  export declare function filterMap<T, U>(iter: Iterable<T> | undefined, fn: (item: T) => U | undefined): U[];
52
52
  export declare function firstDefined<T, U>(array: readonly T[] | undefined, callback: (element: T, index: number) => U | undefined): U | undefined;
53
53
  export declare function filter<T>(array: readonly T[] | undefined, predicate: (value: T, index: number, array: readonly T[]) => boolean): readonly T[];
54
+ export declare function aggregate<T>(arr: T[], fn: (item: T) => number): number;
55
+ export declare function aggregateWithJoiner<T>(arr: T[], fn: (item: T) => number, joiner: string): number;
56
+ export declare function joinArray<T>(arr: readonly T[] | undefined, joiner: string, mapper: (item: T) => string): string;
@@ -1,25 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.emptyArray = void 0;
4
- exports.insertPrioritySorted = insertPrioritySorted;
5
- exports.insertOrderSorted = insertOrderSorted;
6
- exports.binaryFindPartition = binaryFindPartition;
7
- exports.removeIfPresent = removeIfPresent;
8
- exports.removeIf = removeIf;
9
- exports.unique = unique;
10
- exports.partition = partition;
11
- exports.zip = zip;
12
- exports.filterMap = filterMap;
13
- exports.firstDefined = firstDefined;
14
- exports.filter = filter;
15
- exports.emptyArray = [];
1
+ export const emptyArray = [];
16
2
  /**
17
3
  * Inserts an item into an array sorted by priority. If two items have the same priority,
18
4
  * the item will be inserted later will be placed later in the array.
19
5
  * @param arr modified by inserting item.
20
6
  * @param item
21
7
  */
22
- function insertPrioritySorted(arr, item) {
8
+ export function insertPrioritySorted(arr, item) {
23
9
  const index = binaryFindPartition(arr, (v) => v.priority < item.priority);
24
10
  arr.splice(index === -1 ? arr.length : index, 0, item);
25
11
  return arr;
@@ -31,7 +17,7 @@ function insertPrioritySorted(arr, item) {
31
17
  * @param arr modified by inserting item.
32
18
  * @param item
33
19
  */
34
- function insertOrderSorted(arr, item) {
20
+ export function insertOrderSorted(arr, item) {
35
21
  const index = binaryFindPartition(arr, (v) => v.order > item.order);
36
22
  arr.splice(index === -1 ? arr.length : index, 0, item);
37
23
  return arr;
@@ -43,7 +29,7 @@ function insertOrderSorted(arr, item) {
43
29
  * @param arr
44
30
  * @param partition should return true while less than the partition point.
45
31
  */
46
- function binaryFindPartition(arr, partition) {
32
+ export function binaryFindPartition(arr, partition) {
47
33
  if (arr.length === 0) {
48
34
  return -1;
49
35
  }
@@ -65,7 +51,7 @@ function binaryFindPartition(arr, partition) {
65
51
  * @param arr
66
52
  * @param item
67
53
  */
68
- function removeIfPresent(arr, item) {
54
+ export function removeIfPresent(arr, item) {
69
55
  if (!arr) {
70
56
  return;
71
57
  }
@@ -79,7 +65,7 @@ function removeIfPresent(arr, item) {
79
65
  * @param arr
80
66
  * @param predicate
81
67
  */
82
- function removeIf(arr, predicate) {
68
+ export function removeIf(arr, predicate) {
83
69
  for (let i = 0; i < arr.length; i++) {
84
70
  if (predicate(arr[i])) {
85
71
  arr.splice(i, 1);
@@ -91,10 +77,10 @@ function removeIf(arr, predicate) {
91
77
  * Filters out duplicate values from the given iterable.
92
78
  * @param arr
93
79
  */
94
- function unique(arr) {
80
+ export function unique(arr) {
95
81
  return Array.from(new Set(arr));
96
82
  }
97
- function partition(iter, predicate) {
83
+ export function partition(iter, predicate) {
98
84
  const left = [];
99
85
  const right = [];
100
86
  for (const item of iter) {
@@ -107,7 +93,7 @@ function partition(iter, predicate) {
107
93
  }
108
94
  return [left, right];
109
95
  }
110
- function* zip(...args) {
96
+ export function* zip(...args) {
111
97
  const iterators = args.map((x) => x[Symbol.iterator]());
112
98
  for (;;) {
113
99
  const next = iterators.map((i) => i.next());
@@ -117,7 +103,7 @@ function* zip(...args) {
117
103
  yield next.map((v) => v.value);
118
104
  }
119
105
  }
120
- function filterMap(iter, fn) {
106
+ export function filterMap(iter, fn) {
121
107
  const result = [];
122
108
  for (const item of iter || []) {
123
109
  const newItem = fn(item);
@@ -127,7 +113,7 @@ function filterMap(iter, fn) {
127
113
  }
128
114
  return result;
129
115
  }
130
- function firstDefined(array, callback) {
116
+ export function firstDefined(array, callback) {
131
117
  if (array === undefined) {
132
118
  return undefined;
133
119
  }
@@ -139,6 +125,19 @@ function firstDefined(array, callback) {
139
125
  }
140
126
  return undefined;
141
127
  }
142
- function filter(array, predicate) {
143
- return array ? array.filter(predicate) : exports.emptyArray;
128
+ export function filter(array, predicate) {
129
+ return array ? array.filter(predicate) : emptyArray;
130
+ }
131
+ export function aggregate(arr, fn) {
132
+ return arr.reduce((sum, it) => sum + fn(it), 0);
133
+ }
134
+ export function aggregateWithJoiner(arr, fn, joiner) {
135
+ return (arr.reduce((sum, it) => sum + fn(it), 0) +
136
+ (arr.length - 1) * joiner.length);
137
+ }
138
+ export function joinArray(arr, joiner, mapper) {
139
+ if (arr?.length) {
140
+ return arr.map(mapper).join(joiner);
141
+ }
142
+ return "";
144
143
  }
@@ -1,5 +1,5 @@
1
- import type { Application } from "../application";
2
- import { EventDispatcher } from "./events";
1
+ import type { Application } from "../application.js";
2
+ import { EventDispatcher } from "./events.js";
3
3
  /**
4
4
  * Exposes a reference to the root Application component.
5
5
  */
@@ -8,22 +8,6 @@ export interface ComponentHost {
8
8
  }
9
9
  export interface Component<E extends Record<keyof E, unknown[]> = {}> extends AbstractComponent<ComponentHost, E> {
10
10
  }
11
- export interface ComponentClass<T extends Component, O extends ComponentHost = ComponentHost> {
12
- new (owner: O): T;
13
- }
14
- /**
15
- * Option-bag passed to Component decorator.
16
- */
17
- export interface ComponentOptions {
18
- name?: string;
19
- /** Specify valid child component class. Used to prove that children are valid via `instanceof` checks */
20
- childClass?: Function;
21
- internal?: boolean;
22
- }
23
- /**
24
- * Class decorator applied to Components
25
- */
26
- export declare function Component(options: ComponentOptions): (target: Function, _context: unknown) => void;
27
11
  /**
28
12
  * Component base class. Has an owner (unless it's the application root component),
29
13
  * can dispatch events to its children, and has access to the root Application component.
@@ -43,10 +27,6 @@ export declare abstract class AbstractComponent<O extends ComponentHost, E exten
43
27
  * Create new Component instance.
44
28
  */
45
29
  constructor(owner: O);
46
- /**
47
- * Initialize this component.
48
- */
49
- protected initialize(): void;
50
30
  /**
51
31
  * Return the application / root component instance.
52
32
  */
@@ -56,25 +36,3 @@ export declare abstract class AbstractComponent<O extends ComponentHost, E exten
56
36
  */
57
37
  get owner(): O;
58
38
  }
59
- /**
60
- * Component that can have child components.
61
- *
62
- * @template O type of Component's owner
63
- * @template C type of Component's children
64
- */
65
- export declare abstract class ChildableComponent<O extends ComponentHost, C extends Component, E extends Record<keyof E, unknown[]>> extends AbstractComponent<O, E> {
66
- private _componentChildren?;
67
- private _defaultComponents?;
68
- /**
69
- * Create new Component instance.
70
- */
71
- constructor(owner: O);
72
- /**
73
- * Retrieve a plugin instance.
74
- *
75
- * @returns The instance of the plugin or undefined if no plugin with the given class is attached.
76
- */
77
- getComponent(name: string): C | undefined;
78
- getComponents(): C[];
79
- addComponent<T extends C>(name: string, componentClass: T | ComponentClass<T, O>): T;
80
- }
@@ -1,69 +1,25 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChildableComponent = exports.AbstractComponent = void 0;
4
- exports.Component = Component;
5
- const events_1 = require("./events");
6
- const childMappings = [];
7
- /**
8
- * Class decorator applied to Components
9
- */
10
- function Component(options) {
11
- // _context is ClassDecoratorContext, but that then requires a public constructor
12
- // which Application does not have.
13
- return (target, _context) => {
14
- const proto = target.prototype;
15
- if (!(proto instanceof AbstractComponent)) {
16
- throw new Error("The `Component` decorator can only be used with a subclass of `AbstractComponent`.");
17
- }
18
- if (options.childClass) {
19
- if (!(proto instanceof ChildableComponent)) {
20
- throw new Error("The `Component` decorator accepts the parameter `childClass` only when used with a subclass of `ChildableComponent`.");
21
- }
22
- childMappings.push({
23
- host: proto,
24
- child: options.childClass,
25
- });
26
- }
27
- const name = options.name;
28
- if (name) {
29
- proto.componentName = name;
30
- }
31
- // If not marked internal, and if we are a subclass of another component T's declared
32
- // childClass, then register ourselves as a _defaultComponents of T.
33
- const internal = !!options.internal;
34
- if (name && !internal) {
35
- for (const childMapping of childMappings) {
36
- if (!(proto instanceof childMapping.child)) {
37
- continue;
38
- }
39
- const host = childMapping.host;
40
- host["_defaultComponents"] = host["_defaultComponents"] || {};
41
- host["_defaultComponents"][name] = target;
42
- break;
43
- }
44
- }
45
- };
46
- }
1
+ import { EventDispatcher } from "./events.js";
47
2
  /**
48
3
  * Component base class. Has an owner (unless it's the application root component),
49
4
  * can dispatch events to its children, and has access to the root Application component.
50
5
  *
51
6
  * @template O type of component's owner.
52
7
  */
53
- class AbstractComponent extends events_1.EventDispatcher {
8
+ export class AbstractComponent extends EventDispatcher {
9
+ /**
10
+ * The owner of this component instance.
11
+ */
12
+ _componentOwner;
13
+ /**
14
+ * The name of this component as set by the `@Component` decorator.
15
+ */
16
+ componentName;
54
17
  /**
55
18
  * Create new Component instance.
56
19
  */
57
20
  constructor(owner) {
58
21
  super();
59
22
  this._componentOwner = owner;
60
- this.initialize();
61
- }
62
- /**
63
- * Initialize this component.
64
- */
65
- initialize() {
66
- // empty default implementation
67
23
  }
68
24
  /**
69
25
  * Return the application / root component instance.
@@ -83,51 +39,3 @@ class AbstractComponent extends events_1.EventDispatcher {
83
39
  : this._componentOwner;
84
40
  }
85
41
  }
86
- exports.AbstractComponent = AbstractComponent;
87
- /**
88
- * Component that can have child components.
89
- *
90
- * @template O type of Component's owner
91
- * @template C type of Component's children
92
- */
93
- class ChildableComponent extends AbstractComponent {
94
- /**
95
- * Create new Component instance.
96
- */
97
- constructor(owner) {
98
- super(owner);
99
- Object.entries(this._defaultComponents || {}).forEach(([name, component]) => {
100
- this.addComponent(name, component);
101
- });
102
- }
103
- /**
104
- * Retrieve a plugin instance.
105
- *
106
- * @returns The instance of the plugin or undefined if no plugin with the given class is attached.
107
- */
108
- getComponent(name) {
109
- return (this._componentChildren || {})[name];
110
- }
111
- getComponents() {
112
- return Object.values(this._componentChildren || {});
113
- }
114
- addComponent(name, componentClass) {
115
- if (!this._componentChildren) {
116
- this._componentChildren = {};
117
- }
118
- if (this._componentChildren[name]) {
119
- // Component already added so we will return the existing component
120
- // TODO: add better logging around this because it could be unexpected but shouldn't be fatal
121
- // See https://github.com/TypeStrong/typedoc/issues/846
122
- return this._componentChildren[name];
123
- }
124
- else {
125
- const component = typeof componentClass === "function"
126
- ? new componentClass(this)
127
- : componentClass;
128
- this._componentChildren[name] = component;
129
- return component;
130
- }
131
- }
132
- }
133
- exports.ChildableComponent = ChildableComponent;
@@ -1,6 +1,6 @@
1
1
  import ts from "typescript";
2
- import type { Logger } from "./loggers";
3
- import type { Options } from "./options";
2
+ import type { Logger } from "./loggers.js";
3
+ import type { Options } from "./options/index.js";
4
4
  /**
5
5
  * Defines how entry points are interpreted.
6
6
  * @enum
@@ -29,15 +29,14 @@ export declare const EntryPointStrategy: {
29
29
  export type EntryPointStrategy = (typeof EntryPointStrategy)[keyof typeof EntryPointStrategy];
30
30
  export interface DocumentationEntryPoint {
31
31
  displayName: string;
32
- readmeFile?: string;
33
32
  program: ts.Program;
34
33
  sourceFile: ts.SourceFile;
35
- version?: string;
36
34
  }
37
35
  export interface DocumentEntryPoint {
38
36
  displayName: string;
39
37
  path: string;
40
38
  }
39
+ export declare function inferEntryPoints(logger: Logger, options: Options): Promise<DocumentationEntryPoint[]>;
41
40
  export declare function getEntryPoints(logger: Logger, options: Options): DocumentationEntryPoint[] | undefined;
42
41
  /**
43
42
  * Document entry points are markdown documents that the user has requested we include in the project with