typedoc 0.27.9 → 0.28.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (324) hide show
  1. package/README.md +26 -26
  2. package/bin/package.json +1 -1
  3. package/dist/browser-locales/en.d.ts +2 -0
  4. package/dist/browser-locales/en.js +62 -0
  5. package/dist/browser-locales/ja.d.ts +2 -0
  6. package/dist/browser-locales/ja.js +62 -0
  7. package/dist/browser-locales/ko.d.ts +2 -0
  8. package/dist/browser-locales/ko.js +62 -0
  9. package/dist/browser-locales/zh.d.ts +2 -0
  10. package/dist/browser-locales/zh.js +62 -0
  11. package/dist/browser-utils.d.ts +3 -0
  12. package/dist/browser-utils.js +3 -0
  13. package/dist/index.d.ts +15 -9
  14. package/dist/index.js +13 -7
  15. package/dist/lib/application.d.ts +9 -10
  16. package/dist/lib/application.js +75 -56
  17. package/dist/lib/cli.js +4 -3
  18. package/dist/lib/converter/comments/blockLexer.js +2 -2
  19. package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +1 -1
  20. package/dist/lib/converter/comments/declarationReferenceResolver.js +8 -10
  21. package/dist/lib/converter/comments/discovery.d.ts +1 -1
  22. package/dist/lib/converter/comments/discovery.js +3 -4
  23. package/dist/lib/converter/comments/index.d.ts +1 -1
  24. package/dist/lib/converter/comments/index.js +5 -7
  25. package/dist/lib/converter/comments/linkResolver.d.ts +1 -1
  26. package/dist/lib/converter/comments/linkResolver.js +10 -16
  27. package/dist/lib/converter/comments/parser.d.ts +2 -2
  28. package/dist/lib/converter/comments/parser.js +8 -8
  29. package/dist/lib/converter/comments/textParser.d.ts +3 -2
  30. package/dist/lib/converter/comments/textParser.js +1 -2
  31. package/dist/lib/converter/context.d.ts +13 -14
  32. package/dist/lib/converter/context.js +49 -13
  33. package/dist/lib/converter/converter.d.ts +10 -5
  34. package/dist/lib/converter/converter.js +59 -42
  35. package/dist/lib/converter/factories/index-signature.js +3 -2
  36. package/dist/lib/converter/factories/signature.js +5 -6
  37. package/dist/lib/converter/factories/symbol-id.d.ts +4 -0
  38. package/dist/lib/converter/factories/symbol-id.js +92 -0
  39. package/dist/lib/converter/factories/types.d.ts +4 -0
  40. package/dist/lib/converter/factories/types.js +13 -0
  41. package/dist/lib/converter/index.d.ts +3 -4
  42. package/dist/lib/converter/index.js +2 -2
  43. package/dist/lib/converter/jsdoc.js +5 -4
  44. package/dist/lib/converter/plugins/CategoryPlugin.js +4 -2
  45. package/dist/lib/converter/plugins/CommentPlugin.d.ts +0 -1
  46. package/dist/lib/converter/plugins/CommentPlugin.js +8 -6
  47. package/dist/lib/converter/plugins/GroupPlugin.d.ts +2 -3
  48. package/dist/lib/converter/plugins/GroupPlugin.js +8 -7
  49. package/dist/lib/converter/plugins/ImplementsPlugin.js +6 -8
  50. package/dist/lib/converter/plugins/IncludePlugin.d.ts +1 -1
  51. package/dist/lib/converter/plugins/IncludePlugin.js +19 -16
  52. package/dist/lib/converter/plugins/InheritDocPlugin.js +7 -9
  53. package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +3 -2
  54. package/dist/lib/converter/plugins/PackagePlugin.d.ts +3 -2
  55. package/dist/lib/converter/plugins/PackagePlugin.js +23 -19
  56. package/dist/lib/converter/plugins/SourcePlugin.d.ts +2 -1
  57. package/dist/lib/converter/plugins/SourcePlugin.js +10 -9
  58. package/dist/lib/converter/plugins/TypePlugin.d.ts +1 -1
  59. package/dist/lib/converter/plugins/TypePlugin.js +1 -1
  60. package/dist/lib/converter/plugins/index.d.ts +1 -1
  61. package/dist/lib/converter/plugins/index.js +1 -1
  62. package/dist/lib/converter/symbols.js +103 -32
  63. package/dist/lib/converter/types.js +14 -13
  64. package/dist/lib/converter/utils/repository.d.ts +1 -1
  65. package/dist/lib/converter/utils/repository.js +2 -2
  66. package/dist/lib/debug/index.d.ts +2 -2
  67. package/dist/lib/debug/index.js +2 -2
  68. package/dist/lib/debug/{debugReflectionLifetimes.d.ts → reflectionLifetimes.d.ts} +2 -1
  69. package/dist/lib/debug/{debugReflectionLifetimes.js → reflectionLifetimes.js} +12 -4
  70. package/dist/lib/debug/{debugRendererUrls.d.ts → rendererUrls.d.ts} +1 -0
  71. package/dist/lib/debug/rendererUrls.js +68 -0
  72. package/dist/lib/internationalization/index.d.ts +2 -1
  73. package/dist/lib/internationalization/index.js +2 -1
  74. package/dist/lib/internationalization/internationalization.d.ts +16 -46
  75. package/dist/lib/internationalization/internationalization.js +44 -213
  76. package/dist/lib/internationalization/locales/en.cjs +9 -1
  77. package/dist/lib/internationalization/locales/en.d.cts +9 -1
  78. package/dist/lib/internationalization/locales/ja.cjs +1 -0
  79. package/dist/lib/internationalization/locales/zh.cjs +61 -5
  80. package/dist/lib/internationalization/locales/zh.d.cts +26 -2
  81. package/dist/lib/internationalization/translatable.d.ts +2 -1
  82. package/dist/lib/models/{comments/comment.d.ts → Comment.d.ts} +9 -8
  83. package/dist/lib/models/{comments/comment.js → Comment.js} +15 -18
  84. package/dist/lib/models/{reflections/container.d.ts → ContainerReflection.d.ts} +6 -6
  85. package/dist/lib/models/{reflections/container.js → ContainerReflection.js} +4 -5
  86. package/dist/lib/models/{reflections/declaration.d.ts → DeclarationReflection.d.ts} +11 -19
  87. package/dist/lib/models/{reflections/declaration.js → DeclarationReflection.js} +11 -29
  88. package/dist/lib/models/{reflections/document.d.ts → DocumentReflection.d.ts} +3 -3
  89. package/dist/lib/models/{reflections/document.js → DocumentReflection.js} +3 -3
  90. package/dist/lib/models/FileRegistry.d.ts +12 -20
  91. package/dist/lib/models/FileRegistry.js +8 -44
  92. package/dist/lib/models/{reflections/parameter.d.ts → ParameterReflection.d.ts} +4 -4
  93. package/dist/lib/models/{reflections/parameter.js → ParameterReflection.js} +2 -2
  94. package/dist/lib/models/{reflections/project.d.ts → ProjectReflection.d.ts} +12 -21
  95. package/dist/lib/models/{reflections/project.js → ProjectReflection.js} +16 -48
  96. package/dist/lib/models/{reflections/reference.d.ts → ReferenceReflection.d.ts} +3 -3
  97. package/dist/lib/models/{reflections/reference.js → ReferenceReflection.js} +3 -4
  98. package/dist/lib/models/{reflections/abstract.d.ts → Reflection.d.ts} +15 -28
  99. package/dist/lib/models/{reflections/abstract.js → Reflection.js} +38 -21
  100. package/dist/lib/models/ReflectionCategory.d.ts +2 -6
  101. package/dist/lib/models/ReflectionCategory.js +3 -9
  102. package/dist/lib/models/ReflectionGroup.d.ts +1 -5
  103. package/dist/lib/models/ReflectionGroup.js +2 -8
  104. package/dist/lib/models/{reflections/ReflectionSymbolId.d.ts → ReflectionSymbolId.d.ts} +23 -10
  105. package/dist/lib/models/ReflectionSymbolId.js +75 -0
  106. package/dist/lib/models/{reflections/signature.d.ts → SignatureReflection.d.ts} +8 -7
  107. package/dist/lib/models/{reflections/signature.js → SignatureReflection.js} +7 -11
  108. package/dist/lib/models/{sources/file.d.ts → SourceReference.d.ts} +3 -4
  109. package/dist/lib/models/{reflections/type-parameter.d.ts → TypeParameterReflection.d.ts} +6 -5
  110. package/dist/lib/models/{reflections/type-parameter.js → TypeParameterReflection.js} +4 -1
  111. package/dist/lib/models/index.d.ts +18 -6
  112. package/dist/lib/models/index.js +18 -6
  113. package/dist/lib/models/{reflections/kind.d.ts → kind.d.ts} +2 -8
  114. package/dist/lib/models/{reflections/kind.js → kind.js} +99 -30
  115. package/dist/lib/models/types.d.ts +8 -10
  116. package/dist/lib/models/types.js +11 -22
  117. package/dist/lib/models/{reflections/variant.d.ts → variant.d.ts} +7 -7
  118. package/dist/lib/output/components.d.ts +2 -2
  119. package/dist/lib/output/components.js +1 -1
  120. package/dist/lib/output/events.d.ts +10 -18
  121. package/dist/lib/output/events.js +10 -27
  122. package/dist/lib/output/formatter.d.ts +8 -5
  123. package/dist/lib/output/formatter.js +45 -18
  124. package/dist/lib/output/index.d.ts +4 -5
  125. package/dist/lib/output/index.js +4 -4
  126. package/dist/lib/output/output.js +5 -4
  127. package/dist/lib/output/plugins/AssetsPlugin.js +7 -6
  128. package/dist/lib/output/plugins/HierarchyPlugin.js +4 -3
  129. package/dist/lib/output/plugins/IconsPlugin.js +3 -3
  130. package/dist/lib/output/plugins/JavascriptIndexPlugin.js +12 -17
  131. package/dist/lib/output/plugins/SitemapPlugin.js +6 -7
  132. package/dist/lib/output/renderer.d.ts +22 -14
  133. package/dist/lib/output/renderer.js +76 -36
  134. package/dist/lib/output/router.d.ts +175 -0
  135. package/dist/lib/output/router.js +478 -0
  136. package/dist/lib/output/theme.d.ts +3 -28
  137. package/dist/lib/output/theme.js +2 -15
  138. package/dist/lib/output/themes/MarkedPlugin.d.ts +2 -2
  139. package/dist/lib/output/themes/MarkedPlugin.js +32 -30
  140. package/dist/lib/output/themes/default/DefaultTheme.d.ts +11 -40
  141. package/dist/lib/output/themes/default/DefaultTheme.js +207 -406
  142. package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +49 -47
  143. package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +17 -14
  144. package/dist/lib/output/themes/default/Slugger.js +1 -1
  145. package/dist/lib/output/themes/default/layouts/default.d.ts +1 -1
  146. package/dist/lib/output/themes/default/layouts/default.js +6 -6
  147. package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +4 -1
  148. package/dist/lib/output/themes/default/partials/anchor-icon.js +12 -2
  149. package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +2 -2
  150. package/dist/lib/output/themes/default/partials/breadcrumb.js +11 -5
  151. package/dist/lib/output/themes/default/partials/comment.d.ts +1 -1
  152. package/dist/lib/output/themes/default/partials/comment.js +9 -9
  153. package/dist/lib/output/themes/default/partials/footer.d.ts +1 -1
  154. package/dist/lib/output/themes/default/partials/footer.js +2 -2
  155. package/dist/lib/output/themes/default/partials/header.d.ts +2 -2
  156. package/dist/lib/output/themes/default/partials/header.js +4 -3
  157. package/dist/lib/output/themes/default/partials/hierarchy.d.ts +1 -1
  158. package/dist/lib/output/themes/default/partials/hierarchy.js +10 -8
  159. package/dist/lib/output/themes/default/partials/icon.d.ts +2 -3
  160. package/dist/lib/output/themes/default/partials/icon.js +3 -3
  161. package/dist/lib/output/themes/default/partials/index.d.ts +1 -1
  162. package/dist/lib/output/themes/default/partials/index.js +10 -18
  163. package/dist/lib/output/themes/default/partials/member.d.ts +1 -1
  164. package/dist/lib/output/themes/default/partials/member.declaration.d.ts +1 -1
  165. package/dist/lib/output/themes/default/partials/member.declaration.js +2 -2
  166. package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +1 -1
  167. package/dist/lib/output/themes/default/partials/member.getterSetter.js +5 -5
  168. package/dist/lib/output/themes/default/partials/member.js +10 -9
  169. package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +1 -1
  170. package/dist/lib/output/themes/default/partials/member.signature.body.js +4 -4
  171. package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +1 -1
  172. package/dist/lib/output/themes/default/partials/member.signature.title.js +1 -1
  173. package/dist/lib/output/themes/default/partials/member.signatures.d.ts +1 -1
  174. package/dist/lib/output/themes/default/partials/member.signatures.js +4 -4
  175. package/dist/lib/output/themes/default/partials/member.sources.d.ts +1 -1
  176. package/dist/lib/output/themes/default/partials/member.sources.js +7 -7
  177. package/dist/lib/output/themes/default/partials/members.d.ts +1 -1
  178. package/dist/lib/output/themes/default/partials/members.js +2 -2
  179. package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +2 -2
  180. package/dist/lib/output/themes/default/partials/moduleReflection.js +5 -5
  181. package/dist/lib/output/themes/default/partials/navigation.d.ts +1 -1
  182. package/dist/lib/output/themes/default/partials/navigation.js +17 -15
  183. package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +1 -1
  184. package/dist/lib/output/themes/default/partials/reflectionPreview.js +2 -2
  185. package/dist/lib/output/themes/default/partials/toolbar.d.ts +1 -1
  186. package/dist/lib/output/themes/default/partials/toolbar.js +10 -13
  187. package/dist/lib/output/themes/default/partials/type.d.ts +1 -1
  188. package/dist/lib/output/themes/default/partials/type.js +1 -1
  189. package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +1 -1
  190. package/dist/lib/output/themes/default/partials/typeAndParent.js +3 -3
  191. package/dist/lib/output/themes/default/partials/typeDetails.d.ts +1 -1
  192. package/dist/lib/output/themes/default/partials/typeDetails.js +23 -19
  193. package/dist/lib/output/themes/default/partials/typeParameters.d.ts +1 -1
  194. package/dist/lib/output/themes/default/partials/typeParameters.js +12 -7
  195. package/dist/lib/output/themes/default/templates/document.d.ts +1 -1
  196. package/dist/lib/output/themes/default/templates/document.js +2 -2
  197. package/dist/lib/output/themes/default/templates/hierarchy.d.ts +1 -1
  198. package/dist/lib/output/themes/default/templates/hierarchy.js +4 -3
  199. package/dist/lib/output/themes/default/templates/index.d.ts +1 -1
  200. package/dist/lib/output/themes/default/templates/index.js +2 -2
  201. package/dist/lib/output/themes/default/templates/reflection.d.ts +1 -1
  202. package/dist/lib/output/themes/default/templates/reflection.js +9 -12
  203. package/dist/lib/output/themes/lib.d.ts +1 -1
  204. package/dist/lib/output/themes/lib.js +3 -3
  205. package/dist/lib/serialization/components.d.ts +1 -1
  206. package/dist/lib/serialization/deserializer.d.ts +9 -13
  207. package/dist/lib/serialization/deserializer.js +22 -24
  208. package/dist/lib/serialization/events.d.ts +1 -1
  209. package/dist/lib/serialization/index.d.ts +1 -1
  210. package/dist/lib/serialization/index.js +1 -1
  211. package/dist/lib/serialization/schema.d.ts +15 -10
  212. package/dist/lib/serialization/schema.js +1 -1
  213. package/dist/lib/serialization/serializer.d.ts +4 -4
  214. package/dist/lib/serialization/serializer.js +1 -2
  215. package/dist/lib/utils/ValidatingFileRegistry.d.ts +10 -0
  216. package/dist/lib/utils/ValidatingFileRegistry.js +34 -0
  217. package/dist/lib/utils/component.d.ts +1 -1
  218. package/dist/lib/utils/component.js +1 -1
  219. package/dist/lib/utils/entry-point.d.ts +3 -3
  220. package/dist/lib/utils/entry-point.js +29 -26
  221. package/dist/lib/utils/fs.d.ts +5 -13
  222. package/dist/lib/utils/fs.js +11 -67
  223. package/dist/lib/utils/general.d.ts +1 -47
  224. package/dist/lib/utils/general.js +4 -74
  225. package/dist/lib/utils/highlighter.js +1 -2
  226. package/dist/lib/utils/html.d.ts +0 -1
  227. package/dist/lib/utils/html.js +4 -13
  228. package/dist/lib/utils/index.d.ts +9 -17
  229. package/dist/lib/utils/index.js +8 -15
  230. package/dist/lib/utils/loggers.d.ts +5 -108
  231. package/dist/lib/utils/loggers.js +24 -168
  232. package/dist/lib/utils/options/declaration.d.ts +63 -38
  233. package/dist/lib/utils/options/declaration.js +124 -66
  234. package/dist/lib/utils/options/defaults.d.ts +1 -1
  235. package/dist/lib/utils/options/help.d.ts +1 -2
  236. package/dist/lib/utils/options/help.js +5 -5
  237. package/dist/lib/utils/options/index.d.ts +4 -4
  238. package/dist/lib/utils/options/index.js +3 -3
  239. package/dist/lib/utils/options/options.d.ts +3 -6
  240. package/dist/lib/utils/options/options.js +10 -12
  241. package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
  242. package/dist/lib/utils/options/readers/arguments.js +4 -3
  243. package/dist/lib/utils/options/readers/package-json.d.ts +1 -1
  244. package/dist/lib/utils/options/readers/package-json.js +3 -2
  245. package/dist/lib/utils/options/readers/tsconfig.d.ts +1 -1
  246. package/dist/lib/utils/options/readers/tsconfig.js +27 -27
  247. package/dist/lib/utils/options/readers/typedoc.d.ts +1 -1
  248. package/dist/lib/utils/options/readers/typedoc.js +8 -9
  249. package/dist/lib/utils/options/sources/typedoc.js +143 -135
  250. package/dist/lib/utils/options/tsdoc-defaults.d.ts +1 -1
  251. package/dist/lib/utils/options/tsdoc-defaults.js +3 -1
  252. package/dist/lib/utils/package-manifest.d.ts +3 -3
  253. package/dist/lib/utils/package-manifest.js +9 -8
  254. package/dist/lib/utils/paths.d.ts +17 -6
  255. package/dist/lib/utils/paths.js +94 -11
  256. package/dist/lib/utils/perf.d.ts +4 -1
  257. package/dist/lib/utils/perf.js +32 -13
  258. package/dist/lib/utils/plugins.js +4 -3
  259. package/dist/lib/utils/sort.d.ts +1 -1
  260. package/dist/lib/utils/sort.js +8 -3
  261. package/dist/lib/utils/tsconfig.d.ts +1 -1
  262. package/dist/lib/utils/tsconfig.js +4 -3
  263. package/dist/lib/utils-common/general.d.ts +40 -0
  264. package/dist/lib/utils-common/general.js +20 -0
  265. package/dist/lib/utils-common/i18n.d.ts +17 -0
  266. package/dist/lib/utils-common/i18n.js +39 -0
  267. package/dist/lib/utils-common/index.d.ts +16 -0
  268. package/dist/lib/utils-common/index.js +18 -0
  269. package/dist/lib/{utils → utils-common}/jsx.d.ts +3 -3
  270. package/dist/lib/{utils → utils-common}/jsx.js +1 -1
  271. package/dist/lib/utils-common/logger.d.ts +86 -0
  272. package/dist/lib/utils-common/logger.js +120 -0
  273. package/dist/lib/{utils → utils-common}/minimalSourceFile.d.ts +7 -2
  274. package/dist/lib/{utils → utils-common}/minimalSourceFile.js +3 -2
  275. package/dist/lib/utils-common/path.d.ts +35 -0
  276. package/dist/lib/utils-common/path.js +123 -0
  277. package/dist/lib/utils-common/string.d.ts +11 -0
  278. package/dist/lib/utils-common/string.js +84 -0
  279. package/dist/lib/validation/documentation.d.ts +2 -2
  280. package/dist/lib/validation/documentation.js +5 -6
  281. package/dist/lib/validation/exports.d.ts +1 -1
  282. package/dist/lib/validation/exports.js +4 -4
  283. package/dist/lib/validation/links.d.ts +1 -1
  284. package/dist/lib/validation/links.js +9 -8
  285. package/dist/lib/validation/unusedMergeModuleWith.d.ts +1 -1
  286. package/dist/lib/validation/unusedMergeModuleWith.js +3 -2
  287. package/package.json +57 -36
  288. package/static/main.js +4 -4
  289. package/static/style.css +232 -209
  290. package/tsdoc.json +8 -0
  291. package/dist/lib/debug/debugRendererUrls.js +0 -59
  292. package/dist/lib/internationalization/locales/jp.cjs +0 -3
  293. package/dist/lib/internationalization/locales/jp.d.cts +0 -2
  294. package/dist/lib/models/comments/index.d.ts +0 -2
  295. package/dist/lib/models/comments/index.js +0 -1
  296. package/dist/lib/models/reflections/ReflectionSymbolId.js +0 -133
  297. package/dist/lib/models/reflections/index.d.ts +0 -15
  298. package/dist/lib/models/reflections/index.js +0 -12
  299. package/dist/lib/models/sources/index.d.ts +0 -1
  300. package/dist/lib/models/sources/index.js +0 -1
  301. package/dist/lib/output/models/UrlMapping.d.ts +0 -13
  302. package/dist/lib/output/models/UrlMapping.js +0 -10
  303. /package/dist/lib/models/{sources/file.js → SourceReference.js} +0 -0
  304. /package/dist/lib/models/{reflections/utils.d.ts → utils.d.ts} +0 -0
  305. /package/dist/lib/models/{reflections/utils.js → utils.js} +0 -0
  306. /package/dist/lib/models/{reflections/variant.js → variant.js} +0 -0
  307. /package/dist/lib/{utils → utils-common}/array.d.ts +0 -0
  308. /package/dist/lib/{utils → utils-common}/array.js +0 -0
  309. /package/dist/lib/{converter/comments → utils-common}/declarationReference.d.ts +0 -0
  310. /package/dist/lib/{converter/comments → utils-common}/declarationReference.js +0 -0
  311. /package/dist/lib/{utils → utils-common}/enum.d.ts +0 -0
  312. /package/dist/lib/{utils → utils-common}/enum.js +0 -0
  313. /package/dist/lib/{utils → utils-common}/events.d.ts +0 -0
  314. /package/dist/lib/{utils → utils-common}/events.js +0 -0
  315. /package/dist/lib/{utils → utils-common}/hooks.d.ts +0 -0
  316. /package/dist/lib/{utils → utils-common}/hooks.js +0 -0
  317. /package/dist/lib/{utils → utils-common}/jsx.elements.d.ts +0 -0
  318. /package/dist/lib/{utils → utils-common}/jsx.elements.js +0 -0
  319. /package/dist/lib/{utils → utils-common}/map.d.ts +0 -0
  320. /package/dist/lib/{utils → utils-common}/map.js +0 -0
  321. /package/dist/lib/{utils → utils-common}/set.d.ts +0 -0
  322. /package/dist/lib/{utils → utils-common}/set.js +0 -0
  323. /package/dist/lib/{utils → utils-common}/validation.d.ts +0 -0
  324. /package/dist/lib/{utils → utils-common}/validation.js +0 -0
@@ -32,10 +32,10 @@ var __runInitializers = (this && this.__runInitializers) || function (thisArg, i
32
32
  }
33
33
  return useValue ? value : void 0;
34
34
  };
35
- import { Comment } from "../comments/comment.js";
35
+ import { Comment } from "./Comment.js";
36
36
  import { splitUnquotedString } from "./utils.js";
37
+ import { i18n, NonEnumerable } from "#utils";
37
38
  import { ReflectionKind } from "./kind.js";
38
- import { NonEnumerable } from "../../utils/general.js";
39
39
  /**
40
40
  * Current reflection id.
41
41
  */
@@ -163,11 +163,39 @@ export class ReflectionFlags {
163
163
  this.setSingleFlag(flag, set);
164
164
  }
165
165
  }
166
- getFlagStrings(i18n) {
166
+ static flagString(flag) {
167
+ switch (flag) {
168
+ case ReflectionFlag.None:
169
+ throw new Error("Should be unreachable");
170
+ case ReflectionFlag.Private:
171
+ return i18n.flag_private();
172
+ case ReflectionFlag.Protected:
173
+ return i18n.flag_protected();
174
+ case ReflectionFlag.Public:
175
+ return i18n.flag_public();
176
+ case ReflectionFlag.Static:
177
+ return i18n.flag_static();
178
+ case ReflectionFlag.External:
179
+ return i18n.flag_external();
180
+ case ReflectionFlag.Optional:
181
+ return i18n.flag_optional();
182
+ case ReflectionFlag.Rest:
183
+ return i18n.flag_rest();
184
+ case ReflectionFlag.Abstract:
185
+ return i18n.flag_abstract();
186
+ case ReflectionFlag.Const:
187
+ return i18n.flag_const();
188
+ case ReflectionFlag.Readonly:
189
+ return i18n.flag_readonly();
190
+ case ReflectionFlag.Inherited:
191
+ return i18n.flag_inherited();
192
+ }
193
+ }
194
+ getFlagStrings() {
167
195
  const strings = [];
168
196
  for (const flag of relevantFlags) {
169
197
  if (this.hasFlag(flag)) {
170
- strings.push(i18n.flagString(flag));
198
+ strings.push(ReflectionFlags.flagString(flag));
171
199
  }
172
200
  }
173
201
  return strings;
@@ -269,23 +297,6 @@ let Reflection = (() => {
269
297
  * The parsed documentation comment attached to this reflection.
270
298
  */
271
299
  comment = __runInitializers(this, _project_extraInitializers);
272
- /**
273
- * The url of this reflection in the generated documentation.
274
- * TODO: Reflections shouldn't know urls exist. Move this to a serializer.
275
- */
276
- url;
277
- /**
278
- * The name of the anchor of this child.
279
- * TODO: Reflections shouldn't know anchors exist. Move this to a serializer.
280
- */
281
- anchor;
282
- /**
283
- * Is the url pointing to an individual document?
284
- *
285
- * When FALSE, the url points to an anchor tag on a page of a different reflection.
286
- * TODO: Reflections shouldn't know how they are rendered. Move this to the correct serializer.
287
- */
288
- hasOwnDocument;
289
300
  constructor(name, kind, parent) {
290
301
  this.id = REFLECTION_ID++;
291
302
  this.parent = parent;
@@ -393,6 +404,12 @@ let Reflection = (() => {
393
404
  isDeclaration() {
394
405
  return false;
395
406
  }
407
+ isSignature() {
408
+ return false;
409
+ }
410
+ isTypeParameter() {
411
+ return false;
412
+ }
396
413
  isParameter() {
397
414
  return false;
398
415
  }
@@ -1,5 +1,5 @@
1
1
  import type { CommentDisplayPart, DeclarationReflection, DocumentReflection } from "./index.js";
2
- import type { Serializer, JSONOutput, Deserializer } from "../serialization/index.js";
2
+ import type { Deserializer, JSONOutput } from "#serialization";
3
3
  /**
4
4
  * A category of reflections.
5
5
  *
@@ -26,10 +26,6 @@ export declare class ReflectionCategory {
26
26
  * @param title The title of this category.
27
27
  */
28
28
  constructor(title: string);
29
- /**
30
- * Do all children of this category have a separate document?
31
- */
32
- allChildrenHaveOwnDocument(): boolean;
33
- toObject(serializer: Serializer): JSONOutput.ReflectionCategory;
29
+ toObject(): JSONOutput.ReflectionCategory;
34
30
  fromObject(de: Deserializer, obj: JSONOutput.ReflectionCategory): void;
35
31
  }
@@ -1,4 +1,4 @@
1
- import { Comment } from "./comments/index.js";
1
+ import { Comment } from "./Comment.js";
2
2
  /**
3
3
  * A category of reflections.
4
4
  *
@@ -27,17 +27,11 @@ export class ReflectionCategory {
27
27
  constructor(title) {
28
28
  this.title = title;
29
29
  }
30
- /**
31
- * Do all children of this category have a separate document?
32
- */
33
- allChildrenHaveOwnDocument() {
34
- return this.children.every((child) => child.hasOwnDocument);
35
- }
36
- toObject(serializer) {
30
+ toObject() {
37
31
  return {
38
32
  title: this.title,
39
33
  description: this.description
40
- ? Comment.serializeDisplayParts(serializer, this.description)
34
+ ? Comment.serializeDisplayParts(this.description)
41
35
  : undefined,
42
36
  children: this.children.length > 0
43
37
  ? this.children.map((child) => child.id)
@@ -1,6 +1,6 @@
1
1
  import { ReflectionCategory } from "./ReflectionCategory.js";
2
2
  import type { CommentDisplayPart, DeclarationReflection, DocumentReflection, Reflection } from "./index.js";
3
- import type { Serializer, JSONOutput, Deserializer } from "../serialization/index.js";
3
+ import type { Deserializer, JSONOutput, Serializer } from "#serialization";
4
4
  /**
5
5
  * A group of reflections. All reflections in a group are of the same kind.
6
6
  *
@@ -33,10 +33,6 @@ export declare class ReflectionGroup {
33
33
  * @param owningReflection The reflection containing this group, useful for changing rendering based on a comment on a reflection.
34
34
  */
35
35
  constructor(title: string, owningReflection: Reflection);
36
- /**
37
- * Do all children of this group have a separate document?
38
- */
39
- allChildrenHaveOwnDocument(): boolean;
40
36
  toObject(serializer: Serializer): JSONOutput.ReflectionGroup;
41
37
  fromObject(de: Deserializer, obj: JSONOutput.ReflectionGroup): void;
42
38
  }
@@ -1,5 +1,5 @@
1
1
  import { ReflectionCategory } from "./ReflectionCategory.js";
2
- import { Comment } from "./comments/index.js";
2
+ import { Comment } from "./Comment.js";
3
3
  /**
4
4
  * A group of reflections. All reflections in a group are of the same kind.
5
5
  *
@@ -35,17 +35,11 @@ export class ReflectionGroup {
35
35
  this.owningReflection = owningReflection;
36
36
  this.title = title;
37
37
  }
38
- /**
39
- * Do all children of this group have a separate document?
40
- */
41
- allChildrenHaveOwnDocument() {
42
- return this.children.every((child) => child.hasOwnDocument);
43
- }
44
38
  toObject(serializer) {
45
39
  return {
46
40
  title: this.title,
47
41
  description: this.description
48
- ? Comment.serializeDisplayParts(serializer, this.description)
42
+ ? Comment.serializeDisplayParts(this.description)
49
43
  : undefined,
50
44
  children: this.children.length > 0
51
45
  ? this.children.map((child) => child.id)
@@ -1,6 +1,5 @@
1
- import ts from "typescript";
2
- import type { JSONOutput, Serializer } from "../../serialization/index.js";
3
- import type { DeclarationReference } from "../../converter/index.js";
1
+ import type { JSONOutput } from "#serialization";
2
+ import { type DeclarationReference, type NormalizedPath } from "#utils";
4
3
  /**
5
4
  * See {@link ReflectionSymbolId}
6
5
  */
@@ -13,7 +12,26 @@ export type ReflectionSymbolIdString = string & {
13
12
  * runs so long as the symbol is exported from the same file.
14
13
  */
15
14
  export declare class ReflectionSymbolId {
16
- readonly fileName: string;
15
+ /**
16
+ * This will only be used if we somehow cannot find a package.json file for
17
+ * source code. This is very unlikely, but if it occurs then the {@link packageName}
18
+ * will be set to this string, and {@link packagePath} will have the absolute path
19
+ * to the source file.
20
+ */
21
+ static readonly UNKNOWN_PACKAGE = "<unknown>";
22
+ /**
23
+ * The name of the package which this symbol ID resides within.
24
+ */
25
+ readonly packageName: string;
26
+ /**
27
+ * Path to the source file containing this symbol.
28
+ * Note that this is NOT an absolute path, but a package-relative path according
29
+ * to the directory containing package.json for the package name.
30
+ */
31
+ readonly packagePath: NormalizedPath;
32
+ /**
33
+ * Qualified name of this symbol within the source file.
34
+ */
17
35
  readonly qualifiedName: string;
18
36
  /**
19
37
  * Note: This is **not** serialized. It exists for sorting by declaration order, but
@@ -28,13 +46,8 @@ export declare class ReflectionSymbolId {
28
46
  * Note: This can only be non-NaN if {@link pos} is finite.
29
47
  */
30
48
  transientId: number;
31
- constructor(symbol: ts.Symbol, declaration?: ts.Declaration);
32
49
  constructor(json: JSONOutput.ReflectionSymbolId);
33
50
  getStableKey(): ReflectionSymbolIdString;
34
51
  toDeclarationReference(): DeclarationReference;
35
- toObject(serializer: Serializer): {
36
- sourceFileName: string;
37
- qualifiedName: string;
38
- };
52
+ toObject(): JSONOutput.ReflectionSymbolId;
39
53
  }
40
- export declare function addInferredDeclarationMapPaths(opts: ts.CompilerOptions, files: readonly string[]): void;
@@ -0,0 +1,75 @@
1
+ import {} from "#utils";
2
+ import { splitUnquotedString } from "./utils.js";
3
+ /**
4
+ * This exists so that TypeDoc can store a unique identifier for a `ts.Symbol` without
5
+ * keeping a reference to the `ts.Symbol` itself. This identifier should be stable across
6
+ * runs so long as the symbol is exported from the same file.
7
+ */
8
+ export class ReflectionSymbolId {
9
+ /**
10
+ * This will only be used if we somehow cannot find a package.json file for
11
+ * source code. This is very unlikely, but if it occurs then the {@link packageName}
12
+ * will be set to this string, and {@link packagePath} will have the absolute path
13
+ * to the source file.
14
+ */
15
+ static UNKNOWN_PACKAGE = "<unknown>";
16
+ /**
17
+ * The name of the package which this symbol ID resides within.
18
+ */
19
+ packageName;
20
+ /**
21
+ * Path to the source file containing this symbol.
22
+ * Note that this is NOT an absolute path, but a package-relative path according
23
+ * to the directory containing package.json for the package name.
24
+ */
25
+ packagePath;
26
+ /**
27
+ * Qualified name of this symbol within the source file.
28
+ */
29
+ qualifiedName;
30
+ /**
31
+ * Note: This is **not** serialized. It exists for sorting by declaration order, but
32
+ * should not be needed when deserializing from JSON.
33
+ * Will be set to `Infinity` if the ID was deserialized from JSON.
34
+ */
35
+ pos = Infinity;
36
+ /**
37
+ * Note: This is **not** serialized. It exists to support detection of the differences between
38
+ * symbols which share declarations, but are instantiated with different type parameters.
39
+ * This will be `NaN` if the symbol reference is not transient.
40
+ * Note: This can only be non-NaN if {@link pos} is finite.
41
+ */
42
+ transientId = NaN;
43
+ constructor(json) {
44
+ this.packageName = json.packageName;
45
+ this.packagePath = json.packagePath;
46
+ this.qualifiedName = json.qualifiedName;
47
+ }
48
+ getStableKey() {
49
+ if (Number.isFinite(this.pos)) {
50
+ return `${this.packageName}\0${this.packagePath}\0${this.qualifiedName}\0${this.pos}\0${this.transientId}`;
51
+ }
52
+ else {
53
+ return `${this.packageName}\0${this.packagePath}\0${this.qualifiedName}`;
54
+ }
55
+ }
56
+ toDeclarationReference() {
57
+ return {
58
+ resolutionStart: "global",
59
+ moduleSource: this.packageName,
60
+ symbolReference: {
61
+ path: splitUnquotedString(this.qualifiedName, ".").map((path) => ({
62
+ navigation: ".",
63
+ path,
64
+ })),
65
+ },
66
+ };
67
+ }
68
+ toObject() {
69
+ return {
70
+ packageName: this.packageName,
71
+ packagePath: this.packagePath,
72
+ qualifiedName: this.qualifiedName,
73
+ };
74
+ }
75
+ }
@@ -1,11 +1,11 @@
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";
1
+ import { type ReferenceType, type SomeType } from "./types.js";
2
+ import { Reflection, type TraverseCallback } from "./Reflection.js";
3
+ import type { ParameterReflection } from "./ParameterReflection.js";
4
+ import type { TypeParameterReflection } from "./TypeParameterReflection.js";
5
+ import type { DeclarationReflection } from "./DeclarationReflection.js";
6
6
  import type { ReflectionKind } from "./kind.js";
7
- import type { Serializer, JSONOutput, Deserializer } from "../../serialization/index.js";
8
- import { SourceReference } from "../sources/file.js";
7
+ import type { Deserializer, JSONOutput, Serializer } from "#serialization";
8
+ import { SourceReference } from "./SourceReference.js";
9
9
  /**
10
10
  * @category Reflections
11
11
  */
@@ -40,6 +40,7 @@ export declare class SignatureReflection extends Reflection {
40
40
  */
41
41
  implementationOf?: ReferenceType;
42
42
  traverse(callback: TraverseCallback): void;
43
+ isSignature(): this is SignatureReflection;
43
44
  /**
44
45
  * Return a string representation of this reflection.
45
46
  */
@@ -1,6 +1,6 @@
1
- import { ReflectionType } from "../types.js";
2
- import { Reflection, TraverseProperty, } from "./abstract.js";
3
- import { SourceReference } from "../sources/file.js";
1
+ import { ReflectionType } from "./types.js";
2
+ import { Reflection, TraverseProperty } from "./Reflection.js";
3
+ import { SourceReference } from "./SourceReference.js";
4
4
  /**
5
5
  * @category Reflections
6
6
  */
@@ -53,6 +53,9 @@ export class SignatureReflection extends Reflection {
53
53
  }
54
54
  }
55
55
  }
56
+ isSignature() {
57
+ return true;
58
+ }
56
59
  /**
57
60
  * Return a string representation of this reflection.
58
61
  */
@@ -83,14 +86,7 @@ export class SignatureReflection extends Reflection {
83
86
  fromObject(de, obj) {
84
87
  super.fromObject(de, obj);
85
88
  this.sources = de.reviveMany(obj.sources, (t) => new SourceReference(t.fileName, t.line, t.character));
86
- // eslint-disable-next-line @typescript-eslint/no-deprecated
87
- if (obj.typeParameter) {
88
- // eslint-disable-next-line @typescript-eslint/no-deprecated
89
- this.typeParameters = de.reviveMany(obj.typeParameter, (t) => de.constructReflection(t));
90
- }
91
- else {
92
- this.typeParameters = de.reviveMany(obj.typeParameters, (t) => de.constructReflection(t));
93
- }
89
+ this.typeParameters = de.reviveMany(obj.typeParameters, (t) => de.constructReflection(t));
94
90
  this.parameters = de.reviveMany(obj.parameters, (t) => de.constructReflection(t));
95
91
  this.type = de.reviveType(obj.type);
96
92
  this.overwrites = de.reviveType(obj.overwrites);
@@ -1,5 +1,4 @@
1
- import type { Deserializer } from "../../serialization/deserializer.js";
2
- import type { SourceReference as JSONSourceReference } from "../../serialization/schema.js";
1
+ import type { Deserializer, JSONOutput } from "#serialization";
3
2
  /**
4
3
  * Represents references of reflections to their defining source files.
5
4
  *
@@ -29,6 +28,6 @@ export declare class SourceReference {
29
28
  url?: string;
30
29
  constructor(fileName: string, line: number, character: number);
31
30
  equals(other: SourceReference): boolean;
32
- toObject(): JSONSourceReference;
33
- fromObject(_de: Deserializer, obj: JSONSourceReference): void;
31
+ toObject(): JSONOutput.SourceReference;
32
+ fromObject(_de: Deserializer, obj: JSONOutput.SourceReference): void;
34
33
  }
@@ -1,8 +1,8 @@
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";
1
+ import type { SomeType } from "./types.js";
2
+ import { Reflection, type TraverseCallback } from "./Reflection.js";
3
+ import type { DeclarationReflection } from "./DeclarationReflection.js";
4
+ import type { Deserializer, JSONOutput, Serializer } from "#serialization";
5
+ import type { SignatureReflection } from "./SignatureReflection.js";
6
6
  /**
7
7
  * Modifier flags for type parameters, added in TS 4.7
8
8
  * @enum
@@ -23,6 +23,7 @@ export declare class TypeParameterReflection extends Reflection {
23
23
  default?: SomeType;
24
24
  varianceModifier?: VarianceModifier;
25
25
  constructor(name: string, parent: Reflection, varianceModifier: VarianceModifier | undefined);
26
+ isTypeParameter(): this is TypeParameterReflection;
26
27
  toObject(serializer: Serializer): JSONOutput.TypeParameterReflection;
27
28
  fromObject(de: Deserializer, obj: JSONOutput.TypeParameterReflection): void;
28
29
  traverse(_callback: TraverseCallback): void;
@@ -1,4 +1,4 @@
1
- import { Reflection } from "./abstract.js";
1
+ import { Reflection } from "./Reflection.js";
2
2
  import { ReflectionKind } from "./kind.js";
3
3
  /**
4
4
  * Modifier flags for type parameters, added in TS 4.7
@@ -21,6 +21,9 @@ export class TypeParameterReflection extends Reflection {
21
21
  super(name, ReflectionKind.TypeParameter, parent);
22
22
  this.varianceModifier = varianceModifier;
23
23
  }
24
+ isTypeParameter() {
25
+ return true;
26
+ }
24
27
  toObject(serializer) {
25
28
  return {
26
29
  ...super.toObject(serializer),
@@ -1,7 +1,19 @@
1
- export * from "./reflections/index.js";
2
- export * from "./types.js";
3
- export * from "./comments/index.js";
4
- export * from "./sources/index.js";
5
- export * from "./ReflectionGroup.js";
6
- export * from "./ReflectionCategory.js";
1
+ export * from "./Comment.js";
2
+ export * from "./ContainerReflection.js";
3
+ export * from "./DeclarationReflection.js";
4
+ export * from "./DocumentReflection.js";
7
5
  export * from "./FileRegistry.js";
6
+ export * from "./kind.js";
7
+ export * from "./ParameterReflection.js";
8
+ export * from "./ProjectReflection.js";
9
+ export * from "./ReferenceReflection.js";
10
+ export * from "./Reflection.js";
11
+ export * from "./ReflectionCategory.js";
12
+ export * from "./ReflectionGroup.js";
13
+ export * from "./ReflectionSymbolId.js";
14
+ export * from "./SignatureReflection.js";
15
+ export * from "./SourceReference.js";
16
+ export * from "./TypeParameterReflection.js";
17
+ export * from "./types.js";
18
+ export * from "./utils.js";
19
+ export * from "./variant.js";
@@ -1,7 +1,19 @@
1
- export * from "./reflections/index.js";
2
- export * from "./types.js";
3
- export * from "./comments/index.js";
4
- export * from "./sources/index.js";
5
- export * from "./ReflectionGroup.js";
6
- export * from "./ReflectionCategory.js";
1
+ export * from "./Comment.js";
2
+ export * from "./ContainerReflection.js";
3
+ export * from "./DeclarationReflection.js";
4
+ export * from "./DocumentReflection.js";
7
5
  export * from "./FileRegistry.js";
6
+ export * from "./kind.js";
7
+ export * from "./ParameterReflection.js";
8
+ export * from "./ProjectReflection.js";
9
+ export * from "./ReferenceReflection.js";
10
+ export * from "./Reflection.js";
11
+ export * from "./ReflectionCategory.js";
12
+ export * from "./ReflectionGroup.js";
13
+ export * from "./ReflectionSymbolId.js";
14
+ export * from "./SignatureReflection.js";
15
+ export * from "./SourceReference.js";
16
+ export * from "./TypeParameterReflection.js";
17
+ export * from "./types.js";
18
+ export * from "./utils.js";
19
+ export * from "./variant.js";
@@ -1,4 +1,4 @@
1
- import type { EnumKeys } from "../../utils/index.js";
1
+ import { type EnumKeys } from "#utils";
2
2
  /**
3
3
  * Defines the available reflection kinds.
4
4
  * @category Reflections
@@ -78,13 +78,7 @@ export declare namespace ReflectionKind {
78
78
  const VariableContainer: number;
79
79
  /** @internal */
80
80
  const MethodContainer: number;
81
- /**
82
- * Get a non-localized kind string. For the localized string, use `app.internationalization.kindSingularString(kind)`
83
- */
84
- function singularString(kind: ReflectionKind): string;
85
- /**
86
- * Get a non-localized kind string. For the localized string, use `app.internationalization.kindPluralString(kind)`
87
- */
81
+ function singularString(kind: ReflectionKind): import("#utils").TranslatedString;
88
82
  function pluralString(kind: ReflectionKind): string;
89
83
  function classString(kind: ReflectionKind): string;
90
84
  }
@@ -1,3 +1,4 @@
1
+ import { i18n } from "#utils";
1
2
  /**
2
3
  * Defines the available reflection kinds.
3
4
  * @category Reflections
@@ -115,38 +116,109 @@ export var ReflectionKind;
115
116
  ReflectionKind.VariableOrProperty |
116
117
  ReflectionKind.FunctionOrMethod |
117
118
  ReflectionKind.TypeLiteral;
118
- const SINGULARS = {
119
- [ReflectionKind.Enum]: "Enumeration",
120
- [ReflectionKind.EnumMember]: "Enumeration Member",
121
- };
122
- const PLURALS = {
123
- [ReflectionKind.Class]: "Classes",
124
- [ReflectionKind.Property]: "Properties",
125
- [ReflectionKind.Enum]: "Enumerations",
126
- [ReflectionKind.EnumMember]: "Enumeration Members",
127
- [ReflectionKind.TypeAlias]: "Type Aliases",
128
- };
129
- /**
130
- * Get a non-localized kind string. For the localized string, use `app.internationalization.kindSingularString(kind)`
131
- */
132
119
  function singularString(kind) {
133
- if (kind in SINGULARS) {
134
- return SINGULARS[kind];
135
- }
136
- else {
137
- return getKindString(kind);
120
+ switch (kind) {
121
+ case ReflectionKind.Project:
122
+ return i18n.kind_project();
123
+ case ReflectionKind.Module:
124
+ return i18n.kind_module();
125
+ case ReflectionKind.Namespace:
126
+ return i18n.kind_namespace();
127
+ case ReflectionKind.Enum:
128
+ return i18n.kind_enum();
129
+ case ReflectionKind.EnumMember:
130
+ return i18n.kind_enum_member();
131
+ case ReflectionKind.Variable:
132
+ return i18n.kind_variable();
133
+ case ReflectionKind.Function:
134
+ return i18n.kind_function();
135
+ case ReflectionKind.Class:
136
+ return i18n.kind_class();
137
+ case ReflectionKind.Interface:
138
+ return i18n.kind_interface();
139
+ case ReflectionKind.Constructor:
140
+ return i18n.kind_constructor();
141
+ case ReflectionKind.Property:
142
+ return i18n.kind_property();
143
+ case ReflectionKind.Method:
144
+ return i18n.kind_method();
145
+ case ReflectionKind.CallSignature:
146
+ return i18n.kind_call_signature();
147
+ case ReflectionKind.IndexSignature:
148
+ return i18n.kind_index_signature();
149
+ case ReflectionKind.ConstructorSignature:
150
+ return i18n.kind_constructor_signature();
151
+ case ReflectionKind.Parameter:
152
+ return i18n.kind_parameter();
153
+ case ReflectionKind.TypeLiteral:
154
+ return i18n.kind_type_literal();
155
+ case ReflectionKind.TypeParameter:
156
+ return i18n.kind_type_parameter();
157
+ case ReflectionKind.Accessor:
158
+ return i18n.kind_accessor();
159
+ case ReflectionKind.GetSignature:
160
+ return i18n.kind_get_signature();
161
+ case ReflectionKind.SetSignature:
162
+ return i18n.kind_set_signature();
163
+ case ReflectionKind.TypeAlias:
164
+ return i18n.kind_type_alias();
165
+ case ReflectionKind.Reference:
166
+ return i18n.kind_reference();
167
+ case ReflectionKind.Document:
168
+ return i18n.kind_document();
138
169
  }
139
170
  }
140
171
  ReflectionKind.singularString = singularString;
141
- /**
142
- * Get a non-localized kind string. For the localized string, use `app.internationalization.kindPluralString(kind)`
143
- */
144
172
  function pluralString(kind) {
145
- if (kind in PLURALS) {
146
- return PLURALS[kind];
147
- }
148
- else {
149
- return getKindString(kind) + "s";
173
+ switch (kind) {
174
+ case ReflectionKind.Project:
175
+ return i18n.kind_plural_project();
176
+ case ReflectionKind.Module:
177
+ return i18n.kind_plural_module();
178
+ case ReflectionKind.Namespace:
179
+ return i18n.kind_plural_namespace();
180
+ case ReflectionKind.Enum:
181
+ return i18n.kind_plural_enum();
182
+ case ReflectionKind.EnumMember:
183
+ return i18n.kind_plural_enum_member();
184
+ case ReflectionKind.Variable:
185
+ return i18n.kind_plural_variable();
186
+ case ReflectionKind.Function:
187
+ return i18n.kind_plural_function();
188
+ case ReflectionKind.Class:
189
+ return i18n.kind_plural_class();
190
+ case ReflectionKind.Interface:
191
+ return i18n.kind_plural_interface();
192
+ case ReflectionKind.Constructor:
193
+ return i18n.kind_plural_constructor();
194
+ case ReflectionKind.Property:
195
+ return i18n.kind_plural_property();
196
+ case ReflectionKind.Method:
197
+ return i18n.kind_plural_method();
198
+ case ReflectionKind.CallSignature:
199
+ return i18n.kind_plural_call_signature();
200
+ case ReflectionKind.IndexSignature:
201
+ return i18n.kind_plural_index_signature();
202
+ case ReflectionKind.ConstructorSignature:
203
+ return i18n.kind_plural_constructor_signature();
204
+ case ReflectionKind.Parameter:
205
+ return i18n.kind_plural_parameter();
206
+ case ReflectionKind.TypeLiteral:
207
+ return i18n.kind_plural_type_literal();
208
+ case ReflectionKind.TypeParameter:
209
+ return i18n.kind_plural_type_parameter();
210
+ case ReflectionKind.Accessor:
211
+ return i18n.kind_plural_accessor();
212
+ case ReflectionKind.GetSignature:
213
+ return i18n.kind_plural_get_signature();
214
+ case ReflectionKind.SetSignature:
215
+ return i18n.kind_plural_set_signature();
216
+ case ReflectionKind.TypeAlias:
217
+ return i18n.kind_plural_type_alias();
218
+ case ReflectionKind.Reference:
219
+ return i18n.kind_plural_reference();
220
+ case ReflectionKind.Document:
221
+ return i18n.kind_plural_document();
150
222
  }
151
223
  }
152
224
  ReflectionKind.pluralString = pluralString;
@@ -157,6 +229,3 @@ export var ReflectionKind;
157
229
  }
158
230
  ReflectionKind.classString = classString;
159
231
  })(ReflectionKind || (ReflectionKind = {}));
160
- function getKindString(kind) {
161
- return ReflectionKind[kind].replace(/(.)([A-Z])/g, (_m, a, b) => a + " " + b.toLowerCase());
162
- }