typedoc 0.26.11 → 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 (335) 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 +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 +47 -36
  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.js +6 -13
  276. package/dist/lib/utils/minimalSourceFile.js +5 -7
  277. package/dist/lib/utils/options/declaration.d.ts +33 -7
  278. package/dist/lib/utils/options/declaration.js +20 -22
  279. package/dist/lib/utils/options/defaults.d.ts +3 -2
  280. package/dist/lib/utils/options/defaults.js +18 -38
  281. package/dist/lib/utils/options/help.d.ts +2 -2
  282. package/dist/lib/utils/options/help.js +7 -10
  283. package/dist/lib/utils/options/index.d.ts +6 -6
  284. package/dist/lib/utils/options/index.js +4 -18
  285. package/dist/lib/utils/options/options.d.ts +8 -5
  286. package/dist/lib/utils/options/options.js +47 -71
  287. package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
  288. package/dist/lib/utils/options/readers/arguments.js +15 -17
  289. package/dist/lib/utils/options/readers/index.d.ts +4 -4
  290. package/dist/lib/utils/options/readers/index.js +4 -11
  291. package/dist/lib/utils/options/readers/package-json.d.ts +3 -3
  292. package/dist/lib/utils/options/readers/package-json.js +15 -21
  293. package/dist/lib/utils/options/readers/tsconfig.d.ts +2 -2
  294. package/dist/lib/utils/options/readers/tsconfig.js +54 -63
  295. package/dist/lib/utils/options/readers/typedoc.d.ts +3 -3
  296. package/dist/lib/utils/options/readers/typedoc.js +44 -76
  297. package/dist/lib/utils/options/sources/index.d.ts +1 -1
  298. package/dist/lib/utils/options/sources/index.js +1 -5
  299. package/dist/lib/utils/options/sources/typedoc.d.ts +1 -1
  300. package/dist/lib/utils/options/sources/typedoc.js +220 -196
  301. package/dist/lib/utils/options/tsdoc-defaults.d.ts +3 -3
  302. package/dist/lib/utils/options/tsdoc-defaults.js +16 -12
  303. package/dist/lib/utils/package-manifest.d.ts +1 -1
  304. package/dist/lib/utils/package-manifest.js +15 -19
  305. package/dist/lib/utils/paths.js +9 -15
  306. package/dist/lib/utils/perf.js +6 -11
  307. package/dist/lib/utils/plugins.d.ts +1 -1
  308. package/dist/lib/utils/plugins.js +7 -10
  309. package/dist/lib/utils/reflections.d.ts +1 -1
  310. package/dist/lib/utils/reflections.js +9 -12
  311. package/dist/lib/utils/set.js +2 -6
  312. package/dist/lib/utils/sort.d.ts +3 -3
  313. package/dist/lib/utils/sort.js +20 -24
  314. package/dist/lib/utils/tsconfig.d.ts +1 -1
  315. package/dist/lib/utils/tsconfig.js +13 -21
  316. package/dist/lib/utils/tsutils.d.ts +1 -1
  317. package/dist/lib/utils/tsutils.js +3 -30
  318. package/dist/lib/utils/validation.js +6 -12
  319. package/dist/lib/validation/documentation.d.ts +2 -2
  320. package/dist/lib/validation/documentation.js +26 -29
  321. package/dist/lib/validation/exports.d.ts +2 -2
  322. package/dist/lib/validation/exports.js +9 -11
  323. package/dist/lib/validation/links.d.ts +2 -2
  324. package/dist/lib/validation/links.js +4 -7
  325. package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
  326. package/dist/lib/validation/unusedMergeModuleWith.js +11 -0
  327. package/package.json +14 -11
  328. package/static/main.js +4 -4
  329. package/static/style.css +91 -2
  330. package/tsdoc.json +30 -0
  331. package/dist/lib/output/themes/default/partials/member.reference.d.ts +0 -4
  332. package/dist/lib/output/themes/default/partials/member.reference.js +0 -30
  333. package/dist/lib/output/themes/default/partials/parameter.d.ts +0 -4
  334. package/dist/lib/output/themes/default/partials/parameter.js +0 -79
  335. package/dist/lib/utils/html-entities.json +0 -2326
@@ -1,23 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ParameterReflection = void 0;
4
- const types_1 = require("../types");
5
- const abstract_1 = require("./abstract");
1
+ import { ReflectionType } from "../types.js";
2
+ import { Reflection, TraverseProperty, } from "./abstract.js";
6
3
  /**
7
4
  * @category Reflections
8
5
  */
9
- class ParameterReflection extends abstract_1.Reflection {
10
- constructor() {
11
- super(...arguments);
12
- this.variant = "param";
13
- }
6
+ export class ParameterReflection extends Reflection {
7
+ variant = "param";
8
+ defaultValue;
9
+ type;
14
10
  traverse(callback) {
15
- if (this.type instanceof types_1.ReflectionType) {
16
- if (callback(this.type.declaration, abstract_1.TraverseProperty.TypeLiteral) === false) {
11
+ if (this.type instanceof ReflectionType) {
12
+ if (callback(this.type.declaration, TraverseProperty.TypeLiteral) === false) {
17
13
  return;
18
14
  }
19
15
  }
20
16
  }
17
+ isParameter() {
18
+ return true;
19
+ }
21
20
  /**
22
21
  * Return a string representation of this reflection.
23
22
  */
@@ -38,4 +37,3 @@ class ParameterReflection extends abstract_1.Reflection {
38
37
  this.defaultValue = obj.defaultValue;
39
38
  }
40
39
  }
41
- exports.ParameterReflection = ParameterReflection;
@@ -1,13 +1,14 @@
1
- import { type Reflection } from "./abstract";
2
- import { ContainerReflection } from "./container";
3
- import { type Type } from "../types";
4
1
  import type * as ts from "typescript";
5
- import { ReflectionKind } from "./kind";
6
- import { type CommentDisplayPart } from "../comments";
7
- import { ReflectionSymbolId } from "./ReflectionSymbolId";
8
- import type { Serializer } from "../../serialization/serializer";
9
- import type { Deserializer, JSONOutput } from "../../serialization/index";
10
- import type { FileRegistry } from "../FileRegistry";
2
+ import { type Reflection } from "./abstract.js";
3
+ import { ContainerReflection } from "./container.js";
4
+ import type { DeclarationReflection } from "./declaration.js";
5
+ import { type Type } from "../types.js";
6
+ import { ReflectionKind } from "./kind.js";
7
+ import { type CommentDisplayPart } from "../comments/index.js";
8
+ import { ReflectionSymbolId } from "./ReflectionSymbolId.js";
9
+ import type { Serializer } from "../../serialization/serializer.js";
10
+ import type { Deserializer, JSONOutput } from "../../serialization/index.js";
11
+ import type { FileRegistry } from "../FileRegistry.js";
11
12
  /**
12
13
  * A reflection that represents the root of the project.
13
14
  *
@@ -20,6 +21,7 @@ export declare class ProjectReflection extends ContainerReflection {
20
21
  private symbolToReflectionIdMap;
21
22
  private reflectionIdToSymbolIdMap;
22
23
  private reflectionIdToSymbolMap;
24
+ private removedSymbolIds;
23
25
  private referenceGraph?;
24
26
  private reflectionChildren;
25
27
  /**
@@ -78,6 +80,8 @@ export declare class ProjectReflection extends ContainerReflection {
78
80
  * project.
79
81
  */
80
82
  removeReflection(reflection: Reflection): void;
83
+ /** @internal */
84
+ mergeModules(source: DeclarationReflection, target: DeclarationReflection | ProjectReflection): void;
81
85
  /**
82
86
  * Remove a reflection without updating the parent reflection to remove references to the removed reflection.
83
87
  */
@@ -104,6 +108,7 @@ export declare class ProjectReflection extends ContainerReflection {
104
108
  getSymbolIdFromReflection(reflection: Reflection): ReflectionSymbolId | undefined;
105
109
  /** @internal */
106
110
  registerSymbolId(reflection: Reflection, id: ReflectionSymbolId): void;
111
+ symbolIdHasBeenRemoved(id: ReflectionSymbolId): boolean;
107
112
  /**
108
113
  * THIS MAY NOT BE USED AFTER CONVERSION HAS FINISHED.
109
114
  * @internal
@@ -1,15 +1,12 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProjectReflection = void 0;
4
- const abstract_1 = require("./abstract");
5
- const container_1 = require("./container");
6
- const reference_1 = require("./reference");
7
- const types_1 = require("../types");
8
- const utils_1 = require("../../utils");
9
- const kind_1 = require("./kind");
10
- const comments_1 = require("../comments");
11
- const ReflectionSymbolId_1 = require("./ReflectionSymbolId");
12
- const map_1 = require("../../utils/map");
1
+ import { TraverseProperty } from "./abstract.js";
2
+ import { ContainerReflection } from "./container.js";
3
+ import { ReferenceReflection } from "./reference.js";
4
+ import { IntrinsicType, makeRecursiveVisitor } from "../types.js";
5
+ import { assertNever, removeIf, removeIfPresent } from "../../utils/index.js";
6
+ import { ReflectionKind } from "./kind.js";
7
+ import { Comment } from "../comments/index.js";
8
+ import { ReflectionSymbolId } from "./ReflectionSymbolId.js";
9
+ import { DefaultMap, StableKeyMap } from "../../utils/map.js";
13
10
  /**
14
11
  * A reflection that represents the root of the project.
15
12
  *
@@ -17,24 +14,43 @@ const map_1 = require("../../utils/map");
17
14
  * and source files of the processed project through this reflection.
18
15
  * @category Reflections
19
16
  */
20
- class ProjectReflection extends container_1.ContainerReflection {
17
+ export class ProjectReflection extends ContainerReflection {
18
+ variant = "project";
19
+ // Used to resolve references.
20
+ symbolToReflectionIdMap = new StableKeyMap();
21
+ reflectionIdToSymbolIdMap = new Map();
22
+ reflectionIdToSymbolMap = new Map();
23
+ removedSymbolIds = new StableKeyMap();
24
+ // Maps a reflection ID to all references eventually referring to it.
25
+ referenceGraph;
26
+ // Maps a reflection ID to all reflections with it as their parent.
27
+ reflectionChildren = new DefaultMap(() => []);
28
+ /**
29
+ * A list of all reflections within the project. DO NOT MUTATE THIS OBJECT.
30
+ * All mutation should be done via {@link registerReflection} and {@link removeReflection}
31
+ * to ensure that links to reflections remain valid.
32
+ *
33
+ * This may be replaced with a `Map<number, Reflection>` someday.
34
+ */
35
+ reflections = { [this.id]: this };
36
+ /**
37
+ * The name of the package that this reflection documents according to package.json.
38
+ */
39
+ packageName;
40
+ /**
41
+ * The version of the package that this reflection documents according to package.json.
42
+ */
43
+ packageVersion;
44
+ /**
45
+ * The contents of the readme.md file of the project when found.
46
+ */
47
+ readme;
48
+ /**
49
+ * Object which describes where to find content for relative links.
50
+ */
51
+ files;
21
52
  constructor(name, registry) {
22
- super(name, kind_1.ReflectionKind.Project);
23
- this.variant = "project";
24
- // Used to resolve references.
25
- this.symbolToReflectionIdMap = new map_1.StableKeyMap();
26
- this.reflectionIdToSymbolIdMap = new Map();
27
- this.reflectionIdToSymbolMap = new Map();
28
- // Maps a reflection ID to all reflections with it as their parent.
29
- this.reflectionChildren = new map_1.DefaultMap(() => []);
30
- /**
31
- * A list of all reflections within the project. DO NOT MUTATE THIS OBJECT.
32
- * All mutation should be done via {@link registerReflection} and {@link removeReflection}
33
- * to ensure that links to reflections remain valid.
34
- *
35
- * This may be replaced with a `Map<number, Reflection>` someday.
36
- */
37
- this.reflections = { [this.id]: this };
53
+ super(name, ReflectionKind.Project);
38
54
  this.reflections[this.id] = this;
39
55
  this.files = registry;
40
56
  }
@@ -67,7 +83,7 @@ class ProjectReflection extends container_1.ContainerReflection {
67
83
  this.reflections[reflection.id] = reflection;
68
84
  if (symbol) {
69
85
  this.reflectionIdToSymbolMap.set(reflection.id, symbol);
70
- const id = new ReflectionSymbolId_1.ReflectionSymbolId(symbol);
86
+ const id = new ReflectionSymbolId(symbol);
71
87
  this.registerSymbolId(reflection, id);
72
88
  // #2466
73
89
  // If we just registered a member of a class or interface, then we need to check if
@@ -75,15 +91,15 @@ class ProjectReflection extends container_1.ContainerReflection {
75
91
  // This can happen because the compiler API will use non-dependently-typed symbols
76
92
  // for properties of classes/interfaces which inherit them, so we can't rely on the
77
93
  // property being unique for each class.
78
- if (reflection.parent?.kindOf(kind_1.ReflectionKind.ClassOrInterface) &&
79
- reflection.kindOf(kind_1.ReflectionKind.SomeMember)) {
94
+ if (reflection.parent?.kindOf(ReflectionKind.ClassOrInterface) &&
95
+ reflection.kindOf(ReflectionKind.SomeMember)) {
80
96
  const saved = this.symbolToReflectionIdMap.get(id);
81
97
  const parentSymbolReflection = symbol.parent &&
82
98
  this.getReflectionFromSymbol(symbol.parent);
83
99
  if (typeof saved === "object" &&
84
100
  saved.length > 1 &&
85
101
  parentSymbolReflection) {
86
- (0, utils_1.removeIf)(saved, (item) => this.getReflectionById(item)?.parent !==
102
+ removeIf(saved, (item) => this.getReflectionById(item)?.parent !==
87
103
  parentSymbolReflection);
88
104
  }
89
105
  }
@@ -99,7 +115,7 @@ class ProjectReflection extends container_1.ContainerReflection {
99
115
  * @since 0.26.6
100
116
  */
101
117
  removeTypeReflections(type) {
102
- type?.visit((0, types_1.makeRecursiveVisitor)({
118
+ type?.visit(makeRecursiveVisitor({
103
119
  reflection: (type) => {
104
120
  this.removeReflection(type.declaration);
105
121
  },
@@ -124,51 +140,77 @@ class ProjectReflection extends container_1.ContainerReflection {
124
140
  return true; // Continue iteration
125
141
  }
126
142
  switch (property) {
127
- case abstract_1.TraverseProperty.Children:
128
- case abstract_1.TraverseProperty.Documents:
143
+ case TraverseProperty.Children:
144
+ case TraverseProperty.Documents:
129
145
  parent.removeChild(reflection);
130
146
  break;
131
- case abstract_1.TraverseProperty.GetSignature:
147
+ case TraverseProperty.GetSignature:
132
148
  delete parent.getSignature;
133
149
  break;
134
- case abstract_1.TraverseProperty.IndexSignature:
135
- (0, utils_1.removeIfPresent)(parent.indexSignatures, reflection);
150
+ case TraverseProperty.IndexSignature:
151
+ removeIfPresent(parent.indexSignatures, reflection);
136
152
  if (!parent.indexSignatures?.length) {
137
153
  delete parent.indexSignatures;
138
154
  }
139
155
  break;
140
- case abstract_1.TraverseProperty.Parameters:
141
- (0, utils_1.removeIfPresent)(reflection.parent.parameters, reflection);
156
+ case TraverseProperty.Parameters:
157
+ removeIfPresent(reflection.parent.parameters, reflection);
142
158
  if (!reflection.parent.parameters
143
159
  ?.length) {
144
160
  delete reflection.parent
145
161
  .parameters;
146
162
  }
147
163
  break;
148
- case abstract_1.TraverseProperty.SetSignature:
164
+ case TraverseProperty.SetSignature:
149
165
  delete parent.setSignature;
150
166
  break;
151
- case abstract_1.TraverseProperty.Signatures:
152
- (0, utils_1.removeIfPresent)(parent.signatures, reflection);
167
+ case TraverseProperty.Signatures:
168
+ removeIfPresent(parent.signatures, reflection);
153
169
  if (!parent.signatures?.length) {
154
170
  delete parent.signatures;
155
171
  }
156
172
  break;
157
- case abstract_1.TraverseProperty.TypeLiteral:
158
- parent.type = new types_1.IntrinsicType("Object");
173
+ case TraverseProperty.TypeLiteral:
174
+ parent.type = new IntrinsicType("Object");
159
175
  break;
160
- case abstract_1.TraverseProperty.TypeParameter:
161
- (0, utils_1.removeIfPresent)(parent.typeParameters, reflection);
176
+ case TraverseProperty.TypeParameter:
177
+ removeIfPresent(parent.typeParameters, reflection);
162
178
  if (!parent.typeParameters?.length) {
163
179
  delete parent.typeParameters;
164
180
  }
165
181
  break;
166
182
  default:
167
- (0, utils_1.assertNever)(property);
183
+ assertNever(property);
168
184
  }
169
185
  return false; // Stop iteration
170
186
  });
171
187
  }
188
+ /** @internal */
189
+ mergeModules(source, target) {
190
+ // First, tell the children about their new parent
191
+ delete this.referenceGraph;
192
+ const oldChildrenIds = this.reflectionChildren.getNoInsert(source.id) || [];
193
+ const newChildren = this.reflectionChildren.get(target.id);
194
+ for (const childId of oldChildrenIds) {
195
+ const childRefl = this.getReflectionById(childId);
196
+ // To avoid conflicting with some plugins which do this surgery somewhat incorrectly
197
+ // (typedoc-plugin-merge-modules and likely others I'm not aware of) only move children
198
+ // which are still children
199
+ if (childRefl?.parent === source) {
200
+ childRefl.parent = target;
201
+ newChildren.push(childId);
202
+ target.addChild(childRefl);
203
+ }
204
+ }
205
+ // Then remove the now-empty parent
206
+ this.reflectionChildren.delete(source.id);
207
+ this.removeReflection(source);
208
+ // And remove any outdated collections of children on the new parent.
209
+ // So long as this is used before REVIVE(-100) or EVENT_BEGIN_RESOLVE(-100)
210
+ // this will make the appropriate plugin rebuild the lists.
211
+ delete target.groups;
212
+ delete target.categories;
213
+ }
172
214
  /**
173
215
  * Remove a reflection without updating the parent reflection to remove references to the removed reflection.
174
216
  */
@@ -200,9 +242,13 @@ class ProjectReflection extends container_1.ContainerReflection {
200
242
  const saved = this.symbolToReflectionIdMap.get(symbolId);
201
243
  if (saved === reflection.id) {
202
244
  this.symbolToReflectionIdMap.delete(symbolId);
245
+ this.removedSymbolIds.set(symbolId, true);
203
246
  }
204
247
  else if (typeof saved === "object") {
205
- (0, utils_1.removeIfPresent)(saved, reflection.id);
248
+ removeIfPresent(saved, reflection.id);
249
+ if (saved.length === 0) {
250
+ this.removedSymbolIds.set(symbolId, true);
251
+ }
206
252
  }
207
253
  }
208
254
  this.reflectionIdToSymbolMap.delete(reflection.id);
@@ -221,7 +267,7 @@ class ProjectReflection extends container_1.ContainerReflection {
221
267
  * @internal
222
268
  */
223
269
  getReflectionFromSymbol(symbol) {
224
- return this.getReflectionFromSymbolId(new ReflectionSymbolId_1.ReflectionSymbolId(symbol));
270
+ return this.getReflectionFromSymbolId(new ReflectionSymbolId(symbol));
225
271
  }
226
272
  /**
227
273
  * Gets the reflection associated with the given symbol id, if it exists.
@@ -262,6 +308,9 @@ class ProjectReflection extends container_1.ContainerReflection {
262
308
  this.symbolToReflectionIdMap.set(id, reflection.id);
263
309
  }
264
310
  }
311
+ symbolIdHasBeenRemoved(id) {
312
+ return this.removedSymbolIds.has(id);
313
+ }
265
314
  /**
266
315
  * THIS MAY NOT BE USED AFTER CONVERSION HAS FINISHED.
267
316
  * @internal
@@ -274,7 +323,7 @@ class ProjectReflection extends container_1.ContainerReflection {
274
323
  this.referenceGraph = new Map();
275
324
  for (const id in this.reflections) {
276
325
  const ref = this.reflections[id];
277
- if (ref instanceof reference_1.ReferenceReflection) {
326
+ if (ref instanceof ReferenceReflection) {
278
327
  const target = ref.tryGetTargetReflection();
279
328
  if (target) {
280
329
  const refs = this.referenceGraph.get(target.id) ?? [];
@@ -296,7 +345,7 @@ class ProjectReflection extends container_1.ContainerReflection {
296
345
  variant: this.variant,
297
346
  packageName: this.packageName,
298
347
  packageVersion: this.packageVersion,
299
- readme: comments_1.Comment.serializeDisplayParts(serializer, this.readme),
348
+ readme: Comment.serializeDisplayParts(serializer, this.readme),
300
349
  symbolIdMap,
301
350
  files: serializer.toObject(this.files),
302
351
  };
@@ -307,7 +356,7 @@ class ProjectReflection extends container_1.ContainerReflection {
307
356
  this.packageName = obj.packageName;
308
357
  this.packageVersion = obj.packageVersion;
309
358
  if (obj.readme) {
310
- this.readme = comments_1.Comment.deserializeDisplayParts(de, obj.readme);
359
+ this.readme = Comment.deserializeDisplayParts(de, obj.readme);
311
360
  }
312
361
  this.files.fromObject(de, obj.files || {});
313
362
  de.defer(() => {
@@ -315,7 +364,7 @@ class ProjectReflection extends container_1.ContainerReflection {
315
364
  for (const [id, sid] of Object.entries(obj.symbolIdMap || {})) {
316
365
  const refl = this.getReflectionById(de.oldIdToNewId[+id] ?? -1);
317
366
  if (refl) {
318
- this.registerSymbolId(refl, new ReflectionSymbolId_1.ReflectionSymbolId(sid));
367
+ this.registerSymbolId(refl, new ReflectionSymbolId(sid));
319
368
  }
320
369
  else {
321
370
  de.logger.warn(de.application.i18n.serialized_project_referenced_0_not_part_of_project(id.toString()));
@@ -324,4 +373,3 @@ class ProjectReflection extends container_1.ContainerReflection {
324
373
  });
325
374
  }
326
375
  }
327
- exports.ProjectReflection = ProjectReflection;
@@ -1,6 +1,6 @@
1
- import { DeclarationReflection } from "./declaration";
2
- import type { Serializer, JSONOutput, Deserializer } from "../../serialization";
3
- import type { Reflection } from "./abstract";
1
+ import { DeclarationReflection } from "./declaration.js";
2
+ import type { Serializer, JSONOutput, Deserializer } from "../../serialization/index.js";
3
+ import type { Reflection } from "./abstract.js";
4
4
  /**
5
5
  * Describes a reflection which does not exist at this location, but is referenced. Used for imported reflections.
6
6
  *
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ReferenceReflection = void 0;
4
- const declaration_1 = require("./declaration");
5
- const kind_1 = require("./kind");
1
+ import { DeclarationReflection } from "./declaration.js";
2
+ import { ReflectionKind } from "./kind.js";
6
3
  /**
7
4
  * Describes a reflection which does not exist at this location, but is referenced. Used for imported reflections.
8
5
  *
@@ -17,14 +14,15 @@ const kind_1 = require("./kind");
17
14
  * ```
18
15
  * @category Reflections
19
16
  */
20
- class ReferenceReflection extends declaration_1.DeclarationReflection {
17
+ export class ReferenceReflection extends DeclarationReflection {
18
+ variant = "reference";
19
+ _target;
21
20
  /**
22
21
  * Creates a reference reflection. Should only be used within the factory function.
23
22
  * @internal
24
23
  */
25
24
  constructor(name, reflection, parent) {
26
- super(name, kind_1.ReflectionKind.Reference, parent);
27
- this.variant = "reference";
25
+ super(name, ReflectionKind.Reference, parent);
28
26
  this._target = reflection.id;
29
27
  }
30
28
  /**
@@ -86,4 +84,3 @@ class ReferenceReflection extends declaration_1.DeclarationReflection {
86
84
  });
87
85
  }
88
86
  }
89
- exports.ReferenceReflection = ReferenceReflection;
@@ -1,11 +1,11 @@
1
- import { type SomeType, type ReferenceType } from "../types";
2
- import { Reflection, type TraverseCallback } from "./abstract";
3
- import type { ParameterReflection } from "./parameter";
4
- import type { TypeParameterReflection } from "./type-parameter";
5
- import type { DeclarationReflection } from "./declaration";
6
- import type { ReflectionKind } from "./kind";
7
- import type { Serializer, JSONOutput, Deserializer } from "../../serialization";
8
- import { SourceReference } from "../sources/file";
1
+ import { type SomeType, type ReferenceType } from "../types.js";
2
+ import { Reflection, type TraverseCallback } from "./abstract.js";
3
+ import type { ParameterReflection } from "./parameter.js";
4
+ import type { TypeParameterReflection } from "./type-parameter.js";
5
+ import type { DeclarationReflection } from "./declaration.js";
6
+ import type { ReflectionKind } from "./kind.js";
7
+ import type { Serializer, JSONOutput, Deserializer } from "../../serialization/index.js";
8
+ import { SourceReference } from "../sources/file.js";
9
9
  /**
10
10
  * @category Reflections
11
11
  */
@@ -1,32 +1,54 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SignatureReflection = void 0;
4
- const types_1 = require("../types");
5
- const abstract_1 = require("./abstract");
6
- const file_1 = require("../sources/file");
1
+ import { ReflectionType } from "../types.js";
2
+ import { Reflection, TraverseProperty, } from "./abstract.js";
3
+ import { SourceReference } from "../sources/file.js";
7
4
  /**
8
5
  * @category Reflections
9
6
  */
10
- class SignatureReflection extends abstract_1.Reflection {
7
+ export class SignatureReflection extends Reflection {
8
+ variant = "signature";
11
9
  // ESLint is wrong, we're restricting types to be more narrow.
12
10
  // eslint-disable-next-line @typescript-eslint/no-useless-constructor
13
11
  constructor(name, kind, parent) {
14
12
  super(name, kind, parent);
15
- this.variant = "signature";
16
13
  }
14
+ /**
15
+ * A list of all source files that contributed to this reflection.
16
+ */
17
+ sources;
18
+ parameters;
19
+ typeParameters;
20
+ type;
21
+ /**
22
+ * A type that points to the reflection that has been overwritten by this reflection.
23
+ *
24
+ * Applies to interface and class members.
25
+ */
26
+ overwrites;
27
+ /**
28
+ * A type that points to the reflection this reflection has been inherited from.
29
+ *
30
+ * Applies to interface and class members.
31
+ */
32
+ inheritedFrom;
33
+ /**
34
+ * A type that points to the reflection this reflection is the implementation of.
35
+ *
36
+ * Applies to class members.
37
+ */
38
+ implementationOf;
17
39
  traverse(callback) {
18
- if (this.type instanceof types_1.ReflectionType) {
19
- if (callback(this.type.declaration, abstract_1.TraverseProperty.TypeLiteral) === false) {
40
+ if (this.type instanceof ReflectionType) {
41
+ if (callback(this.type.declaration, TraverseProperty.TypeLiteral) === false) {
20
42
  return;
21
43
  }
22
44
  }
23
45
  for (const parameter of this.typeParameters?.slice() || []) {
24
- if (callback(parameter, abstract_1.TraverseProperty.TypeParameter) === false) {
46
+ if (callback(parameter, TraverseProperty.TypeParameter) === false) {
25
47
  return;
26
48
  }
27
49
  }
28
50
  for (const parameter of this.parameters?.slice() || []) {
29
- if (callback(parameter, abstract_1.TraverseProperty.Parameters) === false) {
51
+ if (callback(parameter, TraverseProperty.Parameters) === false) {
30
52
  return;
31
53
  }
32
54
  }
@@ -60,7 +82,7 @@ class SignatureReflection extends abstract_1.Reflection {
60
82
  }
61
83
  fromObject(de, obj) {
62
84
  super.fromObject(de, obj);
63
- this.sources = de.reviveMany(obj.sources, (t) => new file_1.SourceReference(t.fileName, t.line, t.character));
85
+ this.sources = de.reviveMany(obj.sources, (t) => new SourceReference(t.fileName, t.line, t.character));
64
86
  // eslint-disable-next-line @typescript-eslint/no-deprecated
65
87
  if (obj.typeParameter) {
66
88
  // eslint-disable-next-line @typescript-eslint/no-deprecated
@@ -76,4 +98,3 @@ class SignatureReflection extends abstract_1.Reflection {
76
98
  this.implementationOf = de.reviveType(obj.implementationOf);
77
99
  }
78
100
  }
79
- exports.SignatureReflection = SignatureReflection;
@@ -1,8 +1,8 @@
1
- import type { SomeType } from "../types";
2
- import { Reflection, type TraverseCallback } from "./abstract";
3
- import type { DeclarationReflection } from "./declaration";
4
- import type { Serializer, JSONOutput, Deserializer } from "../../serialization";
5
- import type { SignatureReflection } from "./signature";
1
+ import type { SomeType } from "../types.js";
2
+ import { Reflection, type TraverseCallback } from "./abstract.js";
3
+ import type { DeclarationReflection } from "./declaration.js";
4
+ import type { Serializer, JSONOutput, Deserializer } from "../../serialization/index.js";
5
+ import type { SignatureReflection } from "./signature.js";
6
6
  /**
7
7
  * Modifier flags for type parameters, added in TS 4.7
8
8
  * @enum
@@ -1,13 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TypeParameterReflection = exports.VarianceModifier = void 0;
4
- const abstract_1 = require("./abstract");
5
- const kind_1 = require("./kind");
1
+ import { Reflection } from "./abstract.js";
2
+ import { ReflectionKind } from "./kind.js";
6
3
  /**
7
4
  * Modifier flags for type parameters, added in TS 4.7
8
5
  * @enum
9
6
  */
10
- exports.VarianceModifier = {
7
+ export const VarianceModifier = {
11
8
  in: "in",
12
9
  out: "out",
13
10
  inOut: "in out",
@@ -15,10 +12,13 @@ exports.VarianceModifier = {
15
12
  /**
16
13
  * @category Reflections
17
14
  */
18
- class TypeParameterReflection extends abstract_1.Reflection {
15
+ export class TypeParameterReflection extends Reflection {
16
+ variant = "typeParam";
17
+ type;
18
+ default;
19
+ varianceModifier;
19
20
  constructor(name, parent, varianceModifier) {
20
- super(name, kind_1.ReflectionKind.TypeParameter, parent);
21
- this.variant = "typeParam";
21
+ super(name, ReflectionKind.TypeParameter, parent);
22
22
  this.varianceModifier = varianceModifier;
23
23
  }
24
24
  toObject(serializer) {
@@ -40,4 +40,3 @@ class TypeParameterReflection extends abstract_1.Reflection {
40
40
  // do nothing, no child reflections.
41
41
  }
42
42
  }
43
- exports.TypeParameterReflection = TypeParameterReflection;
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.splitUnquotedString = splitUnquotedString;
4
- function splitUnquotedString(input, delimiter) {
1
+ export function splitUnquotedString(input, delimiter) {
5
2
  if (input.startsWith(delimiter)) {
6
3
  return splitUnquotedString(input.substring(delimiter.length), delimiter);
7
4
  }
@@ -1,10 +1,10 @@
1
- import type { DeclarationReflection } from "./declaration";
2
- import type { DocumentReflection } from "./document";
3
- import type { ParameterReflection } from "./parameter";
4
- import type { ProjectReflection } from "./project";
5
- import type { ReferenceReflection } from "./reference";
6
- import type { SignatureReflection } from "./signature";
7
- import type { TypeParameterReflection } from "./type-parameter";
1
+ import type { DeclarationReflection } from "./declaration.js";
2
+ import type { DocumentReflection } from "./document.js";
3
+ import type { ParameterReflection } from "./parameter.js";
4
+ import type { ProjectReflection } from "./project.js";
5
+ import type { ReferenceReflection } from "./reference.js";
6
+ import type { SignatureReflection } from "./signature.js";
7
+ import type { TypeParameterReflection } from "./type-parameter.js";
8
8
  /**
9
9
  * A map of known {@link Reflection} concrete subclasses.
10
10
  * This is used during deserialization to reconstruct serialized objects.
@@ -18,3 +18,4 @@ export interface ReflectionVariant {
18
18
  typeParam: TypeParameterReflection;
19
19
  document: DocumentReflection;
20
20
  }
21
+ export type SomeReflection = ReflectionVariant[keyof ReflectionVariant];
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
@@ -1,5 +1,5 @@
1
- import type { Deserializer } from "../../serialization/deserializer";
2
- import type { SourceReference as JSONSourceReference } from "../../serialization/schema";
1
+ import type { Deserializer } from "../../serialization/deserializer.js";
2
+ import type { SourceReference as JSONSourceReference } from "../../serialization/schema.js";
3
3
  /**
4
4
  * Represents references of reflections to their defining source files.
5
5
  *