typedoc 0.26.10 → 0.27.0-beta.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 (336) 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 +172 -148
  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 +210 -238
  40. package/dist/lib/converter/factories/index-signature.d.ts +1 -1
  41. package/dist/lib/converter/factories/index-signature.js +11 -17
  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 +366 -2
  89. package/dist/lib/internationalization/locales/en.d.cts +339 -2
  90. package/dist/lib/internationalization/locales/jp.cjs +8 -11
  91. package/dist/lib/internationalization/locales/jp.d.cts +310 -1
  92. package/dist/lib/internationalization/locales/ko.cjs +7 -9
  93. package/dist/lib/internationalization/locales/ko.d.cts +223 -1
  94. package/dist/lib/internationalization/locales/zh.cjs +7 -10
  95. package/dist/lib/internationalization/locales/zh.d.cts +381 -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 +26 -13
  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 +619 -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 +13 -0
  154. package/dist/lib/output/output.js +72 -0
  155. package/dist/lib/output/plugins/AssetsPlugin.d.ts +7 -8
  156. package/dist/lib/output/plugins/AssetsPlugin.js +62 -80
  157. package/dist/lib/output/plugins/IconsPlugin.d.ts +3 -2
  158. package/dist/lib/output/plugins/IconsPlugin.js +28 -84
  159. package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +9 -2
  160. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +90 -96
  161. package/dist/lib/output/plugins/NavigationPlugin.d.ts +3 -2
  162. package/dist/lib/output/plugins/NavigationPlugin.js +22 -102
  163. package/dist/lib/output/plugins/SitemapPlugin.d.ts +3 -2
  164. package/dist/lib/output/plugins/SitemapPlugin.js +60 -120
  165. package/dist/lib/output/plugins/index.d.ts +6 -6
  166. package/dist/lib/output/plugins/index.js +6 -15
  167. package/dist/lib/output/renderer.d.ts +14 -13
  168. package/dist/lib/output/renderer.js +129 -185
  169. package/dist/lib/output/theme.d.ts +9 -5
  170. package/dist/lib/output/theme.js +14 -62
  171. package/dist/lib/output/themes/MarkedPlugin.d.ts +8 -9
  172. package/dist/lib/output/themes/MarkedPlugin.js +152 -117
  173. package/dist/lib/output/themes/default/DefaultTheme.d.ts +17 -29
  174. package/dist/lib/output/themes/default/DefaultTheme.js +334 -310
  175. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +63 -48
  176. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +119 -95
  177. package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
  178. package/dist/lib/output/themes/default/Slugger.js +46 -0
  179. package/dist/lib/output/themes/default/layouts/default.d.ts +5 -5
  180. package/dist/lib/output/themes/default/layouts/default.js +67 -34
  181. package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +2 -2
  182. package/dist/lib/output/themes/default/partials/anchor-icon.js +4 -7
  183. package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +3 -3
  184. package/dist/lib/output/themes/default/partials/breadcrumb.js +4 -8
  185. package/dist/lib/output/themes/default/partials/comment.d.ts +6 -4
  186. package/dist/lib/output/themes/default/partials/comment.js +52 -29
  187. package/dist/lib/output/themes/default/partials/footer.d.ts +2 -2
  188. package/dist/lib/output/themes/default/partials/footer.js +11 -14
  189. package/dist/lib/output/themes/default/partials/header.d.ts +4 -4
  190. package/dist/lib/output/themes/default/partials/header.js +9 -13
  191. package/dist/lib/output/themes/default/partials/hierarchy.d.ts +3 -3
  192. package/dist/lib/output/themes/default/partials/hierarchy.js +9 -12
  193. package/dist/lib/output/themes/default/partials/icon.d.ts +4 -4
  194. package/dist/lib/output/themes/default/partials/icon.js +78 -73
  195. package/dist/lib/output/themes/default/partials/index.d.ts +3 -3
  196. package/dist/lib/output/themes/default/partials/index.js +19 -22
  197. package/dist/lib/output/themes/default/partials/member.d.ts +3 -3
  198. package/dist/lib/output/themes/default/partials/member.declaration.d.ts +3 -3
  199. package/dist/lib/output/themes/default/partials/member.declaration.js +18 -61
  200. package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +3 -3
  201. package/dist/lib/output/themes/default/partials/member.getterSetter.js +10 -26
  202. package/dist/lib/output/themes/default/partials/member.js +19 -24
  203. package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +3 -3
  204. package/dist/lib/output/themes/default/partials/member.signature.body.js +17 -21
  205. package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -7
  206. package/dist/lib/output/themes/default/partials/member.signature.title.js +8 -35
  207. package/dist/lib/output/themes/default/partials/member.signatures.d.ts +3 -3
  208. package/dist/lib/output/themes/default/partials/member.signatures.js +9 -13
  209. package/dist/lib/output/themes/default/partials/member.sources.d.ts +3 -3
  210. package/dist/lib/output/themes/default/partials/member.sources.js +13 -17
  211. package/dist/lib/output/themes/default/partials/members.d.ts +3 -3
  212. package/dist/lib/output/themes/default/partials/members.js +10 -42
  213. package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
  214. package/dist/lib/output/themes/default/partials/moduleReflection.js +62 -0
  215. package/dist/lib/output/themes/default/partials/navigation.d.ts +4 -4
  216. package/dist/lib/output/themes/default/partials/navigation.js +51 -62
  217. package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +3 -3
  218. package/dist/lib/output/themes/default/partials/reflectionPreview.js +12 -15
  219. package/dist/lib/output/themes/default/partials/toolbar.d.ts +4 -4
  220. package/dist/lib/output/themes/default/partials/toolbar.js +16 -20
  221. package/dist/lib/output/themes/default/partials/type.d.ts +4 -6
  222. package/dist/lib/output/themes/default/partials/type.js +8 -388
  223. package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +3 -3
  224. package/dist/lib/output/themes/default/partials/typeAndParent.js +11 -15
  225. package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
  226. package/dist/lib/output/themes/default/partials/typeDetails.js +221 -0
  227. package/dist/lib/output/themes/default/partials/typeParameters.d.ts +3 -3
  228. package/dist/lib/output/themes/default/partials/typeParameters.js +14 -17
  229. package/dist/lib/output/themes/default/templates/document.d.ts +4 -4
  230. package/dist/lib/output/themes/default/templates/document.js +3 -7
  231. package/dist/lib/output/themes/default/templates/hierarchy.d.ts +4 -4
  232. package/dist/lib/output/themes/default/templates/hierarchy.js +10 -13
  233. package/dist/lib/output/themes/default/templates/index.d.ts +4 -4
  234. package/dist/lib/output/themes/default/templates/index.js +3 -7
  235. package/dist/lib/output/themes/default/templates/reflection.d.ts +4 -4
  236. package/dist/lib/output/themes/default/templates/reflection.js +31 -34
  237. package/dist/lib/output/themes/lib.d.ts +17 -3
  238. package/dist/lib/output/themes/lib.js +110 -49
  239. package/dist/lib/serialization/components.d.ts +2 -5
  240. package/dist/lib/serialization/components.js +1 -2
  241. package/dist/lib/serialization/deserializer.d.ts +21 -7
  242. package/dist/lib/serialization/deserializer.js +138 -123
  243. package/dist/lib/serialization/events.d.ts +2 -2
  244. package/dist/lib/serialization/events.js +6 -5
  245. package/dist/lib/serialization/index.d.ts +5 -5
  246. package/dist/lib/serialization/index.js +4 -33
  247. package/dist/lib/serialization/schema.d.ts +8 -2
  248. package/dist/lib/serialization/schema.js +2 -2
  249. package/dist/lib/serialization/serializer.d.ts +11 -5
  250. package/dist/lib/serialization/serializer.js +32 -25
  251. package/dist/lib/utils/array.d.ts +3 -0
  252. package/dist/lib/utils/array.js +26 -27
  253. package/dist/lib/utils/component.d.ts +2 -44
  254. package/dist/lib/utils/component.js +10 -102
  255. package/dist/lib/utils/entry-point.d.ts +3 -4
  256. package/dist/lib/utils/entry-point.js +114 -85
  257. package/dist/lib/utils/enum.js +6 -14
  258. package/dist/lib/utils/events.js +6 -12
  259. package/dist/lib/utils/fs.js +50 -91
  260. package/dist/lib/utils/general.d.ts +2 -1
  261. package/dist/lib/utils/general.js +50 -40
  262. package/dist/lib/utils/highlighter.js +30 -57
  263. package/dist/lib/utils/hooks.js +7 -13
  264. package/dist/lib/utils/html-entities.d.ts +8926 -0
  265. package/dist/lib/utils/html-entities.js +2329 -0
  266. package/dist/lib/utils/html.d.ts +8 -0
  267. package/dist/lib/utils/html.js +81 -34
  268. package/dist/lib/utils/index.d.ts +22 -22
  269. package/dist/lib/utils/index.js +20 -91
  270. package/dist/lib/utils/jsx.d.ts +12 -5
  271. package/dist/lib/utils/jsx.elements.js +1 -4
  272. package/dist/lib/utils/jsx.js +53 -20
  273. package/dist/lib/utils/loggers.d.ts +3 -3
  274. package/dist/lib/utils/loggers.js +36 -46
  275. package/dist/lib/utils/map.d.ts +1 -1
  276. package/dist/lib/utils/map.js +6 -13
  277. package/dist/lib/utils/minimalSourceFile.js +5 -7
  278. package/dist/lib/utils/options/declaration.d.ts +33 -7
  279. package/dist/lib/utils/options/declaration.js +20 -22
  280. package/dist/lib/utils/options/defaults.d.ts +3 -2
  281. package/dist/lib/utils/options/defaults.js +18 -38
  282. package/dist/lib/utils/options/help.d.ts +2 -2
  283. package/dist/lib/utils/options/help.js +7 -10
  284. package/dist/lib/utils/options/index.d.ts +6 -6
  285. package/dist/lib/utils/options/index.js +4 -18
  286. package/dist/lib/utils/options/options.d.ts +8 -5
  287. package/dist/lib/utils/options/options.js +47 -71
  288. package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
  289. package/dist/lib/utils/options/readers/arguments.js +15 -17
  290. package/dist/lib/utils/options/readers/index.d.ts +4 -4
  291. package/dist/lib/utils/options/readers/index.js +4 -11
  292. package/dist/lib/utils/options/readers/package-json.d.ts +3 -3
  293. package/dist/lib/utils/options/readers/package-json.js +15 -21
  294. package/dist/lib/utils/options/readers/tsconfig.d.ts +2 -2
  295. package/dist/lib/utils/options/readers/tsconfig.js +54 -63
  296. package/dist/lib/utils/options/readers/typedoc.d.ts +3 -3
  297. package/dist/lib/utils/options/readers/typedoc.js +47 -90
  298. package/dist/lib/utils/options/sources/index.d.ts +1 -1
  299. package/dist/lib/utils/options/sources/index.js +1 -5
  300. package/dist/lib/utils/options/sources/typedoc.d.ts +1 -1
  301. package/dist/lib/utils/options/sources/typedoc.js +220 -196
  302. package/dist/lib/utils/options/tsdoc-defaults.d.ts +3 -3
  303. package/dist/lib/utils/options/tsdoc-defaults.js +16 -12
  304. package/dist/lib/utils/package-manifest.d.ts +1 -1
  305. package/dist/lib/utils/package-manifest.js +15 -19
  306. package/dist/lib/utils/paths.js +9 -15
  307. package/dist/lib/utils/perf.js +6 -11
  308. package/dist/lib/utils/plugins.d.ts +1 -1
  309. package/dist/lib/utils/plugins.js +16 -17
  310. package/dist/lib/utils/reflections.d.ts +1 -1
  311. package/dist/lib/utils/reflections.js +9 -12
  312. package/dist/lib/utils/set.js +2 -6
  313. package/dist/lib/utils/sort.d.ts +3 -3
  314. package/dist/lib/utils/sort.js +20 -24
  315. package/dist/lib/utils/tsconfig.d.ts +1 -1
  316. package/dist/lib/utils/tsconfig.js +13 -21
  317. package/dist/lib/utils/tsutils.d.ts +1 -1
  318. package/dist/lib/utils/tsutils.js +3 -30
  319. package/dist/lib/utils/validation.js +6 -12
  320. package/dist/lib/validation/documentation.d.ts +2 -2
  321. package/dist/lib/validation/documentation.js +26 -29
  322. package/dist/lib/validation/exports.d.ts +2 -2
  323. package/dist/lib/validation/exports.js +9 -11
  324. package/dist/lib/validation/links.d.ts +2 -2
  325. package/dist/lib/validation/links.js +4 -7
  326. package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
  327. package/dist/lib/validation/unusedMergeModuleWith.js +11 -0
  328. package/package.json +14 -11
  329. package/static/main.js +4 -4
  330. package/static/style.css +91 -2
  331. package/tsdoc.json +30 -0
  332. package/dist/lib/output/themes/default/partials/member.reference.d.ts +0 -4
  333. package/dist/lib/output/themes/default/partials/member.reference.js +0 -30
  334. package/dist/lib/output/themes/default/partials/parameter.d.ts +0 -4
  335. package/dist/lib/output/themes/default/partials/parameter.js +0 -79
  336. package/dist/lib/utils/html-entities.json +0 -2326
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
3
2
  function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
4
3
  var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
@@ -33,56 +32,40 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
33
32
  }
34
33
  return useValue ? value : void 0;
35
34
  };
36
- var __setFunctionName = (this && this.__setFunctionName) || function (f, name, prefix) {
37
- if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
38
- return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
39
- };
40
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
41
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
42
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
43
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
44
- };
45
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
46
- if (kind === "m") throw new TypeError("Private method is not writable");
47
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
48
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
49
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
50
- };
51
- var __importDefault = (this && this.__importDefault) || function (mod) {
52
- return (mod && mod.__esModule) ? mod : { "default": mod };
53
- };
54
- Object.defineProperty(exports, "__esModule", { value: true });
55
- exports.Converter = void 0;
56
- const typescript_1 = __importDefault(require("typescript"));
57
- const index_1 = require("../models/index");
58
- const context_1 = require("./context");
59
- const components_1 = require("./components");
60
- const component_1 = require("../utils/component");
61
- const utils_1 = require("../utils");
62
- const types_1 = require("./types");
63
- const converter_events_1 = require("./converter-events");
64
- const symbols_1 = require("./symbols");
65
- const paths_1 = require("../utils/paths");
66
- const enum_1 = require("../utils/enum");
67
- const parser_1 = require("./comments/parser");
68
- const rawLexer_1 = require("./comments/rawLexer");
69
- const linkResolver_1 = require("./comments/linkResolver");
70
- const declarationReference_1 = require("./comments/declarationReference");
71
- const path_1 = require("path");
35
+ import ts from "typescript";
36
+ import { Comment, DocumentReflection, ProjectReflection, ReflectionKind, } from "../models/index.js";
37
+ import { Context } from "./context.js";
38
+ import { AbstractComponent } from "../utils/component.js";
39
+ import { Option, MinimalSourceFile, readFile, unique, getDocumentEntryPoints, } from "../utils/index.js";
40
+ import { convertType } from "./types.js";
41
+ import { ConverterEvents } from "./converter-events.js";
42
+ import { convertSymbol } from "./symbols.js";
43
+ import { createMinimatch, matchesAny, nicePath } from "../utils/paths.js";
44
+ import { hasAllFlags, hasAnyFlag } from "../utils/enum.js";
45
+ import { parseCommentString } from "./comments/parser.js";
46
+ import { lexCommentString } from "./comments/rawLexer.js";
47
+ import { resolvePartLinks, resolveLinks, } from "./comments/linkResolver.js";
48
+ import { meaningToString, } from "./comments/declarationReference.js";
49
+ import { basename, dirname, resolve } from "path";
50
+ import { GroupPlugin } from "./plugins/GroupPlugin.js";
51
+ import { CategoryPlugin } from "./plugins/CategoryPlugin.js";
52
+ import { CommentPlugin } from "./plugins/CommentPlugin.js";
53
+ import { ImplementsPlugin } from "./plugins/ImplementsPlugin.js";
54
+ import { InheritDocPlugin } from "./plugins/InheritDocPlugin.js";
55
+ import { LinkResolverPlugin } from "./plugins/LinkResolverPlugin.js";
56
+ import { PackagePlugin } from "./plugins/PackagePlugin.js";
57
+ import { SourcePlugin } from "./plugins/SourcePlugin.js";
58
+ import { TypePlugin } from "./plugins/TypePlugin.js";
59
+ import { IncludePlugin } from "./plugins/IncludePlugin.js";
60
+ import { MergeModuleWithPlugin } from "./plugins/MergeModuleWithPlugin.js";
72
61
  /**
73
62
  * Compiles source files using TypeScript and converts compiler symbols to reflections.
63
+ *
64
+ * @group Common
65
+ * @summary Responsible for converting TypeScript symbols into {@link Reflection}s and {@link Type}s.
74
66
  */
75
67
  let Converter = (() => {
76
- var _Converter_externalPattern_accessor_storage, _Converter_excludeExternals_accessor_storage, _Converter_excludeNotDocumented_accessor_storage, _Converter_excludePrivate_accessor_storage, _Converter_excludeProtected_accessor_storage, _Converter_excludeReferences_accessor_storage, _Converter_commentStyle_accessor_storage, _Converter_validation_accessor_storage, _Converter_externalSymbolLinkMappings_accessor_storage, _Converter_preserveLinkText_accessor_storage, _Converter_maxTypeConversionDepth_accessor_storage;
77
- let _classDecorators = [(0, component_1.Component)({
78
- name: "converter",
79
- internal: true,
80
- childClass: components_1.ConverterComponent,
81
- })];
82
- let _classDescriptor;
83
- let _classExtraInitializers = [];
84
- let _classThis;
85
- let _classSuper = component_1.ChildableComponent;
68
+ let _classSuper = AbstractComponent;
86
69
  let _externalPattern_decorators;
87
70
  let _externalPattern_initializers = [];
88
71
  let _externalPattern_extraInitializers = [];
@@ -116,59 +99,151 @@ let Converter = (() => {
116
99
  let _maxTypeConversionDepth_decorators;
117
100
  let _maxTypeConversionDepth_initializers = [];
118
101
  let _maxTypeConversionDepth_extraInitializers = [];
119
- var Converter = _classThis = class extends _classSuper {
102
+ return class Converter extends _classSuper {
103
+ static {
104
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
105
+ _externalPattern_decorators = [Option("externalPattern")];
106
+ _excludeExternals_decorators = [Option("excludeExternals")];
107
+ _excludeNotDocumented_decorators = [Option("excludeNotDocumented")];
108
+ _excludePrivate_decorators = [Option("excludePrivate")];
109
+ _excludeProtected_decorators = [Option("excludeProtected")];
110
+ _excludeReferences_decorators = [Option("excludeReferences")];
111
+ _commentStyle_decorators = [Option("commentStyle")];
112
+ _validation_decorators = [Option("validation")];
113
+ _externalSymbolLinkMappings_decorators = [Option("externalSymbolLinkMappings")];
114
+ _preserveLinkText_decorators = [Option("preserveLinkText")];
115
+ _maxTypeConversionDepth_decorators = [Option("maxTypeConversionDepth")];
116
+ __esDecorate(this, null, _externalPattern_decorators, { kind: "accessor", name: "externalPattern", static: false, private: false, access: { has: obj => "externalPattern" in obj, get: obj => obj.externalPattern, set: (obj, value) => { obj.externalPattern = value; } }, metadata: _metadata }, _externalPattern_initializers, _externalPattern_extraInitializers);
117
+ __esDecorate(this, null, _excludeExternals_decorators, { kind: "accessor", name: "excludeExternals", static: false, private: false, access: { has: obj => "excludeExternals" in obj, get: obj => obj.excludeExternals, set: (obj, value) => { obj.excludeExternals = value; } }, metadata: _metadata }, _excludeExternals_initializers, _excludeExternals_extraInitializers);
118
+ __esDecorate(this, null, _excludeNotDocumented_decorators, { kind: "accessor", name: "excludeNotDocumented", static: false, private: false, access: { has: obj => "excludeNotDocumented" in obj, get: obj => obj.excludeNotDocumented, set: (obj, value) => { obj.excludeNotDocumented = value; } }, metadata: _metadata }, _excludeNotDocumented_initializers, _excludeNotDocumented_extraInitializers);
119
+ __esDecorate(this, null, _excludePrivate_decorators, { kind: "accessor", name: "excludePrivate", static: false, private: false, access: { has: obj => "excludePrivate" in obj, get: obj => obj.excludePrivate, set: (obj, value) => { obj.excludePrivate = value; } }, metadata: _metadata }, _excludePrivate_initializers, _excludePrivate_extraInitializers);
120
+ __esDecorate(this, null, _excludeProtected_decorators, { kind: "accessor", name: "excludeProtected", static: false, private: false, access: { has: obj => "excludeProtected" in obj, get: obj => obj.excludeProtected, set: (obj, value) => { obj.excludeProtected = value; } }, metadata: _metadata }, _excludeProtected_initializers, _excludeProtected_extraInitializers);
121
+ __esDecorate(this, null, _excludeReferences_decorators, { kind: "accessor", name: "excludeReferences", static: false, private: false, access: { has: obj => "excludeReferences" in obj, get: obj => obj.excludeReferences, set: (obj, value) => { obj.excludeReferences = value; } }, metadata: _metadata }, _excludeReferences_initializers, _excludeReferences_extraInitializers);
122
+ __esDecorate(this, null, _commentStyle_decorators, { kind: "accessor", name: "commentStyle", static: false, private: false, access: { has: obj => "commentStyle" in obj, get: obj => obj.commentStyle, set: (obj, value) => { obj.commentStyle = value; } }, metadata: _metadata }, _commentStyle_initializers, _commentStyle_extraInitializers);
123
+ __esDecorate(this, null, _validation_decorators, { kind: "accessor", name: "validation", static: false, private: false, access: { has: obj => "validation" in obj, get: obj => obj.validation, set: (obj, value) => { obj.validation = value; } }, metadata: _metadata }, _validation_initializers, _validation_extraInitializers);
124
+ __esDecorate(this, null, _externalSymbolLinkMappings_decorators, { kind: "accessor", name: "externalSymbolLinkMappings", static: false, private: false, access: { has: obj => "externalSymbolLinkMappings" in obj, get: obj => obj.externalSymbolLinkMappings, set: (obj, value) => { obj.externalSymbolLinkMappings = value; } }, metadata: _metadata }, _externalSymbolLinkMappings_initializers, _externalSymbolLinkMappings_extraInitializers);
125
+ __esDecorate(this, null, _preserveLinkText_decorators, { kind: "accessor", name: "preserveLinkText", static: false, private: false, access: { has: obj => "preserveLinkText" in obj, get: obj => obj.preserveLinkText, set: (obj, value) => { obj.preserveLinkText = value; } }, metadata: _metadata }, _preserveLinkText_initializers, _preserveLinkText_extraInitializers);
126
+ __esDecorate(this, null, _maxTypeConversionDepth_decorators, { kind: "accessor", name: "maxTypeConversionDepth", static: false, private: false, access: { has: obj => "maxTypeConversionDepth" in obj, get: obj => obj.maxTypeConversionDepth, set: (obj, value) => { obj.maxTypeConversionDepth = value; } }, metadata: _metadata }, _maxTypeConversionDepth_initializers, _maxTypeConversionDepth_extraInitializers);
127
+ if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
128
+ }
129
+ #externalPattern_accessor_storage = __runInitializers(this, _externalPattern_initializers, void 0);
120
130
  /** @internal */
121
- get externalPattern() { return __classPrivateFieldGet(this, _Converter_externalPattern_accessor_storage, "f"); }
122
- set externalPattern(value) { __classPrivateFieldSet(this, _Converter_externalPattern_accessor_storage, value, "f"); }
131
+ get externalPattern() { return this.#externalPattern_accessor_storage; }
132
+ set externalPattern(value) { this.#externalPattern_accessor_storage = value; }
133
+ externalPatternCache = __runInitializers(this, _externalPattern_extraInitializers);
134
+ excludeCache;
135
+ #excludeExternals_accessor_storage = __runInitializers(this, _excludeExternals_initializers, void 0);
123
136
  /** @internal */
124
- get excludeExternals() { return __classPrivateFieldGet(this, _Converter_excludeExternals_accessor_storage, "f"); }
125
- set excludeExternals(value) { __classPrivateFieldSet(this, _Converter_excludeExternals_accessor_storage, value, "f"); }
137
+ get excludeExternals() { return this.#excludeExternals_accessor_storage; }
138
+ set excludeExternals(value) { this.#excludeExternals_accessor_storage = value; }
139
+ #excludeNotDocumented_accessor_storage = (__runInitializers(this, _excludeExternals_extraInitializers), __runInitializers(this, _excludeNotDocumented_initializers, void 0));
126
140
  /** @internal */
127
- get excludeNotDocumented() { return __classPrivateFieldGet(this, _Converter_excludeNotDocumented_accessor_storage, "f"); }
128
- set excludeNotDocumented(value) { __classPrivateFieldSet(this, _Converter_excludeNotDocumented_accessor_storage, value, "f"); }
141
+ get excludeNotDocumented() { return this.#excludeNotDocumented_accessor_storage; }
142
+ set excludeNotDocumented(value) { this.#excludeNotDocumented_accessor_storage = value; }
143
+ #excludePrivate_accessor_storage = (__runInitializers(this, _excludeNotDocumented_extraInitializers), __runInitializers(this, _excludePrivate_initializers, void 0));
129
144
  /** @internal */
130
- get excludePrivate() { return __classPrivateFieldGet(this, _Converter_excludePrivate_accessor_storage, "f"); }
131
- set excludePrivate(value) { __classPrivateFieldSet(this, _Converter_excludePrivate_accessor_storage, value, "f"); }
145
+ get excludePrivate() { return this.#excludePrivate_accessor_storage; }
146
+ set excludePrivate(value) { this.#excludePrivate_accessor_storage = value; }
147
+ #excludeProtected_accessor_storage = (__runInitializers(this, _excludePrivate_extraInitializers), __runInitializers(this, _excludeProtected_initializers, void 0));
132
148
  /** @internal */
133
- get excludeProtected() { return __classPrivateFieldGet(this, _Converter_excludeProtected_accessor_storage, "f"); }
134
- set excludeProtected(value) { __classPrivateFieldSet(this, _Converter_excludeProtected_accessor_storage, value, "f"); }
149
+ get excludeProtected() { return this.#excludeProtected_accessor_storage; }
150
+ set excludeProtected(value) { this.#excludeProtected_accessor_storage = value; }
151
+ #excludeReferences_accessor_storage = (__runInitializers(this, _excludeProtected_extraInitializers), __runInitializers(this, _excludeReferences_initializers, void 0));
135
152
  /** @internal */
136
- get excludeReferences() { return __classPrivateFieldGet(this, _Converter_excludeReferences_accessor_storage, "f"); }
137
- set excludeReferences(value) { __classPrivateFieldSet(this, _Converter_excludeReferences_accessor_storage, value, "f"); }
153
+ get excludeReferences() { return this.#excludeReferences_accessor_storage; }
154
+ set excludeReferences(value) { this.#excludeReferences_accessor_storage = value; }
155
+ #commentStyle_accessor_storage = (__runInitializers(this, _excludeReferences_extraInitializers), __runInitializers(this, _commentStyle_initializers, void 0));
138
156
  /** @internal */
139
- get commentStyle() { return __classPrivateFieldGet(this, _Converter_commentStyle_accessor_storage, "f"); }
140
- set commentStyle(value) { __classPrivateFieldSet(this, _Converter_commentStyle_accessor_storage, value, "f"); }
157
+ get commentStyle() { return this.#commentStyle_accessor_storage; }
158
+ set commentStyle(value) { this.#commentStyle_accessor_storage = value; }
159
+ #validation_accessor_storage = (__runInitializers(this, _commentStyle_extraInitializers), __runInitializers(this, _validation_initializers, void 0));
141
160
  /** @internal */
142
- get validation() { return __classPrivateFieldGet(this, _Converter_validation_accessor_storage, "f"); }
143
- set validation(value) { __classPrivateFieldSet(this, _Converter_validation_accessor_storage, value, "f"); }
161
+ get validation() { return this.#validation_accessor_storage; }
162
+ set validation(value) { this.#validation_accessor_storage = value; }
163
+ #externalSymbolLinkMappings_accessor_storage = (__runInitializers(this, _validation_extraInitializers), __runInitializers(this, _externalSymbolLinkMappings_initializers, void 0));
144
164
  /** @internal */
145
- get externalSymbolLinkMappings() { return __classPrivateFieldGet(this, _Converter_externalSymbolLinkMappings_accessor_storage, "f"); }
146
- set externalSymbolLinkMappings(value) { __classPrivateFieldSet(this, _Converter_externalSymbolLinkMappings_accessor_storage, value, "f"); }
165
+ get externalSymbolLinkMappings() { return this.#externalSymbolLinkMappings_accessor_storage; }
166
+ set externalSymbolLinkMappings(value) { this.#externalSymbolLinkMappings_accessor_storage = value; }
167
+ #preserveLinkText_accessor_storage = (__runInitializers(this, _externalSymbolLinkMappings_extraInitializers), __runInitializers(this, _preserveLinkText_initializers, void 0));
147
168
  /** @internal */
148
- get preserveLinkText() { return __classPrivateFieldGet(this, _Converter_preserveLinkText_accessor_storage, "f"); }
149
- set preserveLinkText(value) { __classPrivateFieldSet(this, _Converter_preserveLinkText_accessor_storage, value, "f"); }
169
+ get preserveLinkText() { return this.#preserveLinkText_accessor_storage; }
170
+ set preserveLinkText(value) { this.#preserveLinkText_accessor_storage = value; }
171
+ #maxTypeConversionDepth_accessor_storage = (__runInitializers(this, _preserveLinkText_extraInitializers), __runInitializers(this, _maxTypeConversionDepth_initializers, void 0));
150
172
  /** @internal */
151
- get maxTypeConversionDepth() { return __classPrivateFieldGet(this, _Converter_maxTypeConversionDepth_accessor_storage, "f"); }
152
- set maxTypeConversionDepth(value) { __classPrivateFieldSet(this, _Converter_maxTypeConversionDepth_accessor_storage, value, "f"); }
173
+ get maxTypeConversionDepth() { return this.#maxTypeConversionDepth_accessor_storage; }
174
+ set maxTypeConversionDepth(value) { this.#maxTypeConversionDepth_accessor_storage = value; }
175
+ _config = __runInitializers(this, _maxTypeConversionDepth_extraInitializers);
176
+ _externalSymbolResolvers = [];
153
177
  get config() {
154
178
  return this._config || this._buildCommentParserConfig();
155
179
  }
180
+ /**
181
+ * General events
182
+ */
183
+ /**
184
+ * Triggered when the converter begins converting a project.
185
+ * The listener will be given a {@link Context} object.
186
+ * @event
187
+ */
188
+ static EVENT_BEGIN = ConverterEvents.BEGIN;
189
+ /**
190
+ * Triggered when the converter has finished converting a project.
191
+ * The listener will be given a {@link Context} object.
192
+ * @event
193
+ */
194
+ static EVENT_END = ConverterEvents.END;
195
+ /**
196
+ * Factory events
197
+ */
198
+ /**
199
+ * Triggered when the converter has created a declaration reflection.
200
+ * The listener will be given {@link Context} and a {@link Models.DeclarationReflection}.
201
+ * @event
202
+ */
203
+ static EVENT_CREATE_DECLARATION = ConverterEvents.CREATE_DECLARATION;
204
+ /**
205
+ * Triggered when the converter has created a signature reflection.
206
+ * The listener will be given {@link Context}, {@link Models.SignatureReflection} | {@link Models.ProjectReflection} the declaration,
207
+ * `ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature | undefined`,
208
+ * and `ts.Signature | undefined`. The signature will be undefined if the created signature is an index signature.
209
+ * @event
210
+ */
211
+ static EVENT_CREATE_SIGNATURE = ConverterEvents.CREATE_SIGNATURE;
212
+ /**
213
+ * Triggered when the converter has created a parameter reflection.
214
+ * The listener will be given {@link Context}, {@link Models.ParameterReflection} and a `ts.Node?`
215
+ * @event
216
+ */
217
+ static EVENT_CREATE_PARAMETER = ConverterEvents.CREATE_PARAMETER;
218
+ /**
219
+ * Triggered when the converter has created a type parameter reflection.
220
+ * The listener will be given {@link Context} and a {@link Models.TypeParameterReflection}
221
+ * @event
222
+ */
223
+ static EVENT_CREATE_TYPE_PARAMETER = ConverterEvents.CREATE_TYPE_PARAMETER;
224
+ /**
225
+ * Resolve events
226
+ */
227
+ /**
228
+ * Triggered when the converter begins resolving a project.
229
+ * The listener will be given {@link Context}.
230
+ * @event
231
+ */
232
+ static EVENT_RESOLVE_BEGIN = ConverterEvents.RESOLVE_BEGIN;
233
+ /**
234
+ * Triggered when the converter resolves a reflection.
235
+ * The listener will be given {@link Context} and a {@link Reflection}.
236
+ * @event
237
+ */
238
+ static EVENT_RESOLVE = ConverterEvents.RESOLVE;
239
+ /**
240
+ * Triggered when the converter has finished resolving a project.
241
+ * The listener will be given {@link Context}.
242
+ * @event
243
+ */
244
+ static EVENT_RESOLVE_END = ConverterEvents.RESOLVE_END;
156
245
  constructor(owner) {
157
246
  super(owner);
158
- _Converter_externalPattern_accessor_storage.set(this, __runInitializers(this, _externalPattern_initializers, void 0));
159
- this.externalPatternCache = __runInitializers(this, _externalPattern_extraInitializers);
160
- _Converter_excludeExternals_accessor_storage.set(this, __runInitializers(this, _excludeExternals_initializers, void 0));
161
- _Converter_excludeNotDocumented_accessor_storage.set(this, (__runInitializers(this, _excludeExternals_extraInitializers), __runInitializers(this, _excludeNotDocumented_initializers, void 0)));
162
- _Converter_excludePrivate_accessor_storage.set(this, (__runInitializers(this, _excludeNotDocumented_extraInitializers), __runInitializers(this, _excludePrivate_initializers, void 0)));
163
- _Converter_excludeProtected_accessor_storage.set(this, (__runInitializers(this, _excludePrivate_extraInitializers), __runInitializers(this, _excludeProtected_initializers, void 0)));
164
- _Converter_excludeReferences_accessor_storage.set(this, (__runInitializers(this, _excludeProtected_extraInitializers), __runInitializers(this, _excludeReferences_initializers, void 0)));
165
- _Converter_commentStyle_accessor_storage.set(this, (__runInitializers(this, _excludeReferences_extraInitializers), __runInitializers(this, _commentStyle_initializers, void 0)));
166
- _Converter_validation_accessor_storage.set(this, (__runInitializers(this, _commentStyle_extraInitializers), __runInitializers(this, _validation_initializers, void 0)));
167
- _Converter_externalSymbolLinkMappings_accessor_storage.set(this, (__runInitializers(this, _validation_extraInitializers), __runInitializers(this, _externalSymbolLinkMappings_initializers, void 0)));
168
- _Converter_preserveLinkText_accessor_storage.set(this, (__runInitializers(this, _externalSymbolLinkMappings_extraInitializers), __runInitializers(this, _preserveLinkText_initializers, void 0)));
169
- _Converter_maxTypeConversionDepth_accessor_storage.set(this, (__runInitializers(this, _preserveLinkText_extraInitializers), __runInitializers(this, _maxTypeConversionDepth_initializers, void 0)));
170
- this._config = __runInitializers(this, _maxTypeConversionDepth_extraInitializers);
171
- this._externalSymbolResolvers = [];
172
247
  const userConfiguredSymbolResolver = (ref, refl, _part, symbolId) => {
173
248
  if (symbolId) {
174
249
  return userConfiguredSymbolResolver(symbolId.toDeclarationReference(), refl, undefined, undefined);
@@ -187,7 +262,7 @@ let Converter = (() => {
187
262
  name += ref.symbolReference.path.map((p) => p.path).join(".");
188
263
  }
189
264
  if (ref.symbolReference.meaning) {
190
- name += (0, declarationReference_1.meaningToString)(ref.symbolReference.meaning);
265
+ name += meaningToString(ref.symbolReference.meaning);
191
266
  }
192
267
  if (typeof modLinks[name] === "string") {
193
268
  return modLinks[name];
@@ -197,15 +272,26 @@ let Converter = (() => {
197
272
  }
198
273
  };
199
274
  this.addUnknownSymbolResolver(userConfiguredSymbolResolver);
275
+ new CategoryPlugin(this);
276
+ new CommentPlugin(this);
277
+ new GroupPlugin(this);
278
+ new ImplementsPlugin(this);
279
+ new InheritDocPlugin(this);
280
+ new LinkResolverPlugin(this);
281
+ new PackagePlugin(this);
282
+ new SourcePlugin(this);
283
+ new TypePlugin(this);
284
+ new IncludePlugin(this);
285
+ new MergeModuleWithPlugin(this);
200
286
  }
201
287
  /**
202
288
  * Compile the given source files and create a project reflection for them.
203
289
  */
204
290
  convert(entryPoints) {
205
- const programs = (0, utils_1.unique)(entryPoints.map((e) => e.program));
291
+ const programs = unique(entryPoints.map((e) => e.program));
206
292
  this.externalPatternCache = void 0;
207
- const project = new index_1.ProjectReflection(this.application.options.getValue("name"), this.application.files);
208
- const context = new context_1.Context(this, programs, project);
293
+ const project = new ProjectReflection(this.application.options.getValue("name"), this.application.files);
294
+ const context = new Context(this, programs, project);
209
295
  this.trigger(Converter.EVENT_BEGIN, context);
210
296
  this.addProjectDocuments(project);
211
297
  this.compile(entryPoints, context);
@@ -216,11 +302,11 @@ let Converter = (() => {
216
302
  }
217
303
  /** @internal */
218
304
  addProjectDocuments(project) {
219
- const projectDocuments = (0, utils_1.getDocumentEntryPoints)(this.application.logger, this.application.options);
305
+ const projectDocuments = getDocumentEntryPoints(this.application.logger, this.application.options);
220
306
  for (const { displayName, path } of projectDocuments) {
221
307
  let file;
222
308
  try {
223
- file = new utils_1.MinimalSourceFile((0, utils_1.readFile)(path), path);
309
+ file = new MinimalSourceFile(readFile(path), path);
224
310
  }
225
311
  catch (error) {
226
312
  this.application.logger.error(this.application.logger.i18n.failed_to_read_0_when_processing_project_document(path));
@@ -231,7 +317,7 @@ let Converter = (() => {
231
317
  }
232
318
  /** @internal */
233
319
  convertSymbol(context, symbol, exportSymbol) {
234
- (0, symbols_1.convertSymbol)(context, symbol, exportSymbol);
320
+ convertSymbol(context, symbol, exportSymbol);
235
321
  }
236
322
  /**
237
323
  * Convert the given TypeScript type into its TypeDoc type reflection.
@@ -241,13 +327,13 @@ let Converter = (() => {
241
327
  * @internal
242
328
  */
243
329
  convertType(context, node) {
244
- return (0, types_1.convertType)(context, node);
330
+ return convertType(context, node);
245
331
  }
246
332
  /**
247
333
  * Parse the given file into a comment. Intended to be used with markdown files.
248
334
  */
249
335
  parseRawComment(file, files) {
250
- return (0, parser_1.parseCommentString)((0, rawLexer_1.lexCommentString)(file.text), this.config, file, this.application.logger, files);
336
+ return parseCommentString(lexCommentString(file.text), this.config, file, this.application.logger, files);
251
337
  }
252
338
  /**
253
339
  * Adds a new resolver that the theme can use to try to figure out how to link to a symbol declared
@@ -273,11 +359,11 @@ let Converter = (() => {
273
359
  }
274
360
  }
275
361
  resolveLinks(comment, owner) {
276
- if (comment instanceof index_1.Comment) {
277
- (0, linkResolver_1.resolveLinks)(comment, owner, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
362
+ if (comment instanceof Comment) {
363
+ resolveLinks(comment, owner, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
278
364
  }
279
365
  else {
280
- return (0, linkResolver_1.resolvePartLinks)(owner, comment, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
366
+ return resolvePartLinks(owner, comment, (ref, part, refl, id) => this.resolveExternalLink(ref, part, refl, id), { preserveLinkText: this.preserveLinkText });
281
367
  }
282
368
  }
283
369
  /**
@@ -329,16 +415,10 @@ let Converter = (() => {
329
415
  moduleContext = context;
330
416
  }
331
417
  else {
332
- const reflection = context.createDeclarationReflection(index_1.ReflectionKind.Module, symbol, void 0, entryName);
418
+ const reflection = context.createDeclarationReflection(ReflectionKind.Module, symbol, void 0, entryName);
333
419
  if (!reflection.comment && !symbol) {
334
420
  reflection.comment = context.getFileComment(node);
335
421
  }
336
- if (entryPoint.readmeFile) {
337
- const readme = (0, utils_1.readFile)(entryPoint.readmeFile);
338
- const { content } = this.parseRawComment(new utils_1.MinimalSourceFile(readme, entryPoint.readmeFile), context.project.files);
339
- reflection.readme = content;
340
- }
341
- reflection.packageVersion = entryPoint.version;
342
422
  context.finalizeDeclarationReflection(reflection);
343
423
  moduleContext = context.withScope(reflection);
344
424
  }
@@ -380,34 +460,34 @@ let Converter = (() => {
380
460
  return this.excludeExternals && this.isExternal(symbol);
381
461
  }
382
462
  isExcluded(symbol) {
383
- this.excludeCache ??= (0, paths_1.createMinimatch)(this.application.options.getValue("exclude"));
463
+ this.excludeCache ??= createMinimatch(this.application.options.getValue("exclude"));
384
464
  const cache = this.excludeCache;
385
- return (symbol.getDeclarations() ?? []).some((node) => (0, paths_1.matchesAny)(cache, node.getSourceFile().fileName));
465
+ return (symbol.getDeclarations() ?? []).some((node) => matchesAny(cache, node.getSourceFile().fileName));
386
466
  }
387
467
  /** @internal */
388
468
  isExternal(symbol) {
389
- this.externalPatternCache ??= (0, paths_1.createMinimatch)(this.externalPattern);
469
+ this.externalPatternCache ??= createMinimatch(this.externalPattern);
390
470
  const cache = this.externalPatternCache;
391
- return (symbol.getDeclarations() ?? []).some((node) => (0, paths_1.matchesAny)(cache, node.getSourceFile().fileName));
471
+ return (symbol.getDeclarations() ?? []).some((node) => matchesAny(cache, node.getSourceFile().fileName));
392
472
  }
393
473
  processDocumentTags(reflection, parent) {
394
474
  let relativeTo = reflection.comment?.sourcePath;
395
475
  if (relativeTo) {
396
- relativeTo = (0, path_1.dirname)(relativeTo);
476
+ relativeTo = dirname(relativeTo);
397
477
  const tags = reflection.comment?.getTags("@document") || [];
398
478
  reflection.comment?.removeTags("@document");
399
479
  for (const tag of tags) {
400
- const path = index_1.Comment.combineDisplayParts(tag.content);
480
+ const path = Comment.combineDisplayParts(tag.content);
401
481
  let file;
402
482
  try {
403
- const resolved = (0, path_1.resolve)(relativeTo, path);
404
- file = new utils_1.MinimalSourceFile((0, utils_1.readFile)(resolved), resolved);
483
+ const resolved = resolve(relativeTo, path);
484
+ file = new MinimalSourceFile(readFile(resolved), resolved);
405
485
  }
406
486
  catch {
407
- this.application.logger.warn(this.application.logger.i18n.failed_to_read_0_when_processing_document_tag_in_1((0, paths_1.nicePath)(path), (0, paths_1.nicePath)(reflection.comment.sourcePath)));
487
+ this.application.logger.warn(this.application.logger.i18n.failed_to_read_0_when_processing_document_tag_in_1(nicePath(path), nicePath(reflection.comment.sourcePath)));
408
488
  continue;
409
489
  }
410
- this.addDocument(parent, file, (0, path_1.basename)(file.fileName).replace(/\.[^.]+$/, ""));
490
+ this.addDocument(parent, file, basename(file.fileName).replace(/\.[^.]+$/, ""));
411
491
  }
412
492
  }
413
493
  }
@@ -415,21 +495,22 @@ let Converter = (() => {
415
495
  const { content, frontmatter } = this.parseRawComment(file, parent.project.files);
416
496
  const children = frontmatter["children"];
417
497
  delete frontmatter["children"];
418
- const docRefl = new index_1.DocumentReflection(displayName, parent, content, frontmatter);
498
+ const docRefl = new DocumentReflection(displayName, parent, content, frontmatter);
419
499
  parent.addChild(docRefl);
420
500
  parent.project.registerReflection(docRefl, undefined, file.fileName);
501
+ this.trigger(ConverterEvents.CREATE_DOCUMENT, undefined, docRefl);
421
502
  const childrenToAdd = [];
422
503
  if (children && typeof children === "object") {
423
504
  if (Array.isArray(children)) {
424
505
  for (const child of children) {
425
506
  if (typeof child === "string") {
426
507
  childrenToAdd.push([
427
- (0, path_1.basename)(child).replace(/\.[^.]+$/, ""),
508
+ basename(child).replace(/\.[^.]+$/, ""),
428
509
  child,
429
510
  ]);
430
511
  }
431
512
  else {
432
- this.application.logger.error(this.application.i18n.frontmatter_children_0_should_be_an_array_of_strings_or_object_with_string_values((0, paths_1.nicePath)(file.fileName)));
513
+ this.application.logger.error(this.application.i18n.frontmatter_children_0_should_be_an_array_of_strings_or_object_with_string_values(nicePath(file.fileName)));
433
514
  return;
434
515
  }
435
516
  }
@@ -440,20 +521,20 @@ let Converter = (() => {
440
521
  childrenToAdd.push([name, path]);
441
522
  }
442
523
  else {
443
- this.application.logger.error(this.application.i18n.frontmatter_children_0_should_be_an_array_of_strings_or_object_with_string_values((0, paths_1.nicePath)(file.fileName)));
524
+ this.application.logger.error(this.application.i18n.frontmatter_children_0_should_be_an_array_of_strings_or_object_with_string_values(nicePath(file.fileName)));
444
525
  return;
445
526
  }
446
527
  }
447
528
  }
448
529
  }
449
530
  for (const [displayName, path] of childrenToAdd) {
450
- const absPath = (0, path_1.resolve)((0, path_1.dirname)(file.fileName), path);
531
+ const absPath = resolve(dirname(file.fileName), path);
451
532
  let childFile;
452
533
  try {
453
- childFile = new utils_1.MinimalSourceFile((0, utils_1.readFile)(absPath), absPath);
534
+ childFile = new MinimalSourceFile(readFile(absPath), absPath);
454
535
  }
455
536
  catch (error) {
456
- this.application.logger.error(this.application.logger.i18n.failed_to_read_0_when_processing_document_child_in_1(path, (0, paths_1.nicePath)(file.fileName)));
537
+ this.application.logger.error(this.application.logger.i18n.failed_to_read_0_when_processing_document_child_in_1(path, nicePath(file.fileName)));
457
538
  continue;
458
539
  }
459
540
  this.addDocument(docRefl, childFile, displayName);
@@ -475,117 +556,8 @@ let Converter = (() => {
475
556
  return this._config;
476
557
  }
477
558
  };
478
- _Converter_externalPattern_accessor_storage = new WeakMap();
479
- _Converter_excludeExternals_accessor_storage = new WeakMap();
480
- _Converter_excludeNotDocumented_accessor_storage = new WeakMap();
481
- _Converter_excludePrivate_accessor_storage = new WeakMap();
482
- _Converter_excludeProtected_accessor_storage = new WeakMap();
483
- _Converter_excludeReferences_accessor_storage = new WeakMap();
484
- _Converter_commentStyle_accessor_storage = new WeakMap();
485
- _Converter_validation_accessor_storage = new WeakMap();
486
- _Converter_externalSymbolLinkMappings_accessor_storage = new WeakMap();
487
- _Converter_preserveLinkText_accessor_storage = new WeakMap();
488
- _Converter_maxTypeConversionDepth_accessor_storage = new WeakMap();
489
- __setFunctionName(_classThis, "Converter");
490
- (() => {
491
- const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
492
- _externalPattern_decorators = [(0, utils_1.Option)("externalPattern")];
493
- _excludeExternals_decorators = [(0, utils_1.Option)("excludeExternals")];
494
- _excludeNotDocumented_decorators = [(0, utils_1.Option)("excludeNotDocumented")];
495
- _excludePrivate_decorators = [(0, utils_1.Option)("excludePrivate")];
496
- _excludeProtected_decorators = [(0, utils_1.Option)("excludeProtected")];
497
- _excludeReferences_decorators = [(0, utils_1.Option)("excludeReferences")];
498
- _commentStyle_decorators = [(0, utils_1.Option)("commentStyle")];
499
- _validation_decorators = [(0, utils_1.Option)("validation")];
500
- _externalSymbolLinkMappings_decorators = [(0, utils_1.Option)("externalSymbolLinkMappings")];
501
- _preserveLinkText_decorators = [(0, utils_1.Option)("preserveLinkText")];
502
- _maxTypeConversionDepth_decorators = [(0, utils_1.Option)("maxTypeConversionDepth")];
503
- __esDecorate(_classThis, null, _externalPattern_decorators, { kind: "accessor", name: "externalPattern", static: false, private: false, access: { has: obj => "externalPattern" in obj, get: obj => obj.externalPattern, set: (obj, value) => { obj.externalPattern = value; } }, metadata: _metadata }, _externalPattern_initializers, _externalPattern_extraInitializers);
504
- __esDecorate(_classThis, null, _excludeExternals_decorators, { kind: "accessor", name: "excludeExternals", static: false, private: false, access: { has: obj => "excludeExternals" in obj, get: obj => obj.excludeExternals, set: (obj, value) => { obj.excludeExternals = value; } }, metadata: _metadata }, _excludeExternals_initializers, _excludeExternals_extraInitializers);
505
- __esDecorate(_classThis, null, _excludeNotDocumented_decorators, { kind: "accessor", name: "excludeNotDocumented", static: false, private: false, access: { has: obj => "excludeNotDocumented" in obj, get: obj => obj.excludeNotDocumented, set: (obj, value) => { obj.excludeNotDocumented = value; } }, metadata: _metadata }, _excludeNotDocumented_initializers, _excludeNotDocumented_extraInitializers);
506
- __esDecorate(_classThis, null, _excludePrivate_decorators, { kind: "accessor", name: "excludePrivate", static: false, private: false, access: { has: obj => "excludePrivate" in obj, get: obj => obj.excludePrivate, set: (obj, value) => { obj.excludePrivate = value; } }, metadata: _metadata }, _excludePrivate_initializers, _excludePrivate_extraInitializers);
507
- __esDecorate(_classThis, null, _excludeProtected_decorators, { kind: "accessor", name: "excludeProtected", static: false, private: false, access: { has: obj => "excludeProtected" in obj, get: obj => obj.excludeProtected, set: (obj, value) => { obj.excludeProtected = value; } }, metadata: _metadata }, _excludeProtected_initializers, _excludeProtected_extraInitializers);
508
- __esDecorate(_classThis, null, _excludeReferences_decorators, { kind: "accessor", name: "excludeReferences", static: false, private: false, access: { has: obj => "excludeReferences" in obj, get: obj => obj.excludeReferences, set: (obj, value) => { obj.excludeReferences = value; } }, metadata: _metadata }, _excludeReferences_initializers, _excludeReferences_extraInitializers);
509
- __esDecorate(_classThis, null, _commentStyle_decorators, { kind: "accessor", name: "commentStyle", static: false, private: false, access: { has: obj => "commentStyle" in obj, get: obj => obj.commentStyle, set: (obj, value) => { obj.commentStyle = value; } }, metadata: _metadata }, _commentStyle_initializers, _commentStyle_extraInitializers);
510
- __esDecorate(_classThis, null, _validation_decorators, { kind: "accessor", name: "validation", static: false, private: false, access: { has: obj => "validation" in obj, get: obj => obj.validation, set: (obj, value) => { obj.validation = value; } }, metadata: _metadata }, _validation_initializers, _validation_extraInitializers);
511
- __esDecorate(_classThis, null, _externalSymbolLinkMappings_decorators, { kind: "accessor", name: "externalSymbolLinkMappings", static: false, private: false, access: { has: obj => "externalSymbolLinkMappings" in obj, get: obj => obj.externalSymbolLinkMappings, set: (obj, value) => { obj.externalSymbolLinkMappings = value; } }, metadata: _metadata }, _externalSymbolLinkMappings_initializers, _externalSymbolLinkMappings_extraInitializers);
512
- __esDecorate(_classThis, null, _preserveLinkText_decorators, { kind: "accessor", name: "preserveLinkText", static: false, private: false, access: { has: obj => "preserveLinkText" in obj, get: obj => obj.preserveLinkText, set: (obj, value) => { obj.preserveLinkText = value; } }, metadata: _metadata }, _preserveLinkText_initializers, _preserveLinkText_extraInitializers);
513
- __esDecorate(_classThis, null, _maxTypeConversionDepth_decorators, { kind: "accessor", name: "maxTypeConversionDepth", static: false, private: false, access: { has: obj => "maxTypeConversionDepth" in obj, get: obj => obj.maxTypeConversionDepth, set: (obj, value) => { obj.maxTypeConversionDepth = value; } }, metadata: _metadata }, _maxTypeConversionDepth_initializers, _maxTypeConversionDepth_extraInitializers);
514
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
515
- Converter = _classThis = _classDescriptor.value;
516
- if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
517
- })();
518
- /**
519
- * General events
520
- */
521
- /**
522
- * Triggered when the converter begins converting a project.
523
- * The listener will be given a {@link Context} object.
524
- * @event
525
- */
526
- _classThis.EVENT_BEGIN = converter_events_1.ConverterEvents.BEGIN;
527
- /**
528
- * Triggered when the converter has finished converting a project.
529
- * The listener will be given a {@link Context} object.
530
- * @event
531
- */
532
- _classThis.EVENT_END = converter_events_1.ConverterEvents.END;
533
- /**
534
- * Factory events
535
- */
536
- /**
537
- * Triggered when the converter has created a declaration reflection.
538
- * The listener will be given {@link Context} and a {@link Models.DeclarationReflection}.
539
- * @event
540
- */
541
- _classThis.EVENT_CREATE_DECLARATION = converter_events_1.ConverterEvents.CREATE_DECLARATION;
542
- /**
543
- * Triggered when the converter has created a signature reflection.
544
- * The listener will be given {@link Context}, {@link Models.SignatureReflection} | {@link Models.ProjectReflection} the declaration,
545
- * `ts.SignatureDeclaration | ts.IndexSignatureDeclaration | ts.JSDocSignature | undefined`,
546
- * and `ts.Signature | undefined`. The signature will be undefined if the created signature is an index signature.
547
- * @event
548
- */
549
- _classThis.EVENT_CREATE_SIGNATURE = converter_events_1.ConverterEvents.CREATE_SIGNATURE;
550
- /**
551
- * Triggered when the converter has created a parameter reflection.
552
- * The listener will be given {@link Context}, {@link Models.ParameterReflection} and a `ts.Node?`
553
- * @event
554
- */
555
- _classThis.EVENT_CREATE_PARAMETER = converter_events_1.ConverterEvents.CREATE_PARAMETER;
556
- /**
557
- * Triggered when the converter has created a type parameter reflection.
558
- * The listener will be given {@link Context} and a {@link Models.TypeParameterReflection}
559
- * @event
560
- */
561
- _classThis.EVENT_CREATE_TYPE_PARAMETER = converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER;
562
- /**
563
- * Resolve events
564
- */
565
- /**
566
- * Triggered when the converter begins resolving a project.
567
- * The listener will be given {@link Context}.
568
- * @event
569
- */
570
- _classThis.EVENT_RESOLVE_BEGIN = converter_events_1.ConverterEvents.RESOLVE_BEGIN;
571
- /**
572
- * Triggered when the converter resolves a reflection.
573
- * The listener will be given {@link Context} and a {@link Reflection}.
574
- * @event
575
- */
576
- _classThis.EVENT_RESOLVE = converter_events_1.ConverterEvents.RESOLVE;
577
- /**
578
- * Triggered when the converter has finished resolving a project.
579
- * The listener will be given {@link Context}.
580
- * @event
581
- */
582
- _classThis.EVENT_RESOLVE_END = converter_events_1.ConverterEvents.RESOLVE_END;
583
- (() => {
584
- __runInitializers(_classThis, _classExtraInitializers);
585
- })();
586
- return Converter = _classThis;
587
559
  })();
588
- exports.Converter = Converter;
560
+ export { Converter };
589
561
  function getSymbolForModuleLike(context, node) {
590
562
  const symbol = context.checker.getSymbolAtLocation(node) ?? node.symbol;
591
563
  if (symbol) {
@@ -596,15 +568,15 @@ function getSymbolForModuleLike(context, node) {
596
568
  // "globals" file, but this is uncommon enough that I'm skipping it for now.
597
569
  const sourceFile = node.getSourceFile();
598
570
  const globalSymbols = context.checker
599
- .getSymbolsInScope(node, typescript_1.default.SymbolFlags.ModuleMember)
571
+ .getSymbolsInScope(node, ts.SymbolFlags.ModuleMember)
600
572
  .filter((s) => s.getDeclarations()?.some((d) => d.getSourceFile() === sourceFile));
601
573
  // Detect declaration files with declare module "foo" as their only export
602
574
  // and lift that up one level as the source file symbol
603
575
  if (globalSymbols.length === 1 &&
604
576
  globalSymbols[0]
605
577
  .getDeclarations()
606
- ?.every((declaration) => typescript_1.default.isModuleDeclaration(declaration) &&
607
- typescript_1.default.isStringLiteral(declaration.name))) {
578
+ ?.every((declaration) => ts.isModuleDeclaration(declaration) &&
579
+ ts.isStringLiteral(declaration.name))) {
608
580
  return globalSymbols[0];
609
581
  }
610
582
  }
@@ -619,15 +591,15 @@ function getExports(context, node, symbol) {
619
591
  // members of the export= class and as functions if a class is directly exported.
620
592
  result = [exportEq].concat(context.checker
621
593
  .getExportsOfModule(symbol)
622
- .filter((s) => !(0, enum_1.hasAnyFlag)(s.flags, typescript_1.default.SymbolFlags.Prototype | typescript_1.default.SymbolFlags.Value)));
594
+ .filter((s) => !hasAnyFlag(s.flags, ts.SymbolFlags.Prototype | ts.SymbolFlags.Value)));
623
595
  }
624
596
  else if (symbol) {
625
597
  result = context.checker
626
598
  .getExportsOfModule(symbol)
627
- .filter((s) => !(0, enum_1.hasAllFlags)(s.flags, typescript_1.default.SymbolFlags.Prototype));
599
+ .filter((s) => !hasAllFlags(s.flags, ts.SymbolFlags.Prototype));
628
600
  if (result.length === 0) {
629
- const globalDecl = node.statements.find((s) => typescript_1.default.isModuleDeclaration(s) &&
630
- s.flags & typescript_1.default.NodeFlags.GlobalAugmentation);
601
+ const globalDecl = node.statements.find((s) => ts.isModuleDeclaration(s) &&
602
+ s.flags & ts.NodeFlags.GlobalAugmentation);
631
603
  if (globalDecl) {
632
604
  const globalSymbol = context.getSymbolAtLocation(globalDecl);
633
605
  if (globalSymbol) {
@@ -642,7 +614,7 @@ function getExports(context, node, symbol) {
642
614
  // Global file with no inferred top level symbol, get all symbols declared in this file.
643
615
  const sourceFile = node.getSourceFile();
644
616
  result = context.checker
645
- .getSymbolsInScope(node, typescript_1.default.SymbolFlags.ModuleMember)
617
+ .getSymbolsInScope(node, ts.SymbolFlags.ModuleMember)
646
618
  .filter((s) => s
647
619
  .getDeclarations()
648
620
  ?.some((d) => d.getSourceFile() === sourceFile));