typedoc 0.26.10 → 0.27.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/package.json +3 -0
- package/bin/typedoc +1 -1
- package/dist/index.d.ts +23 -13
- package/dist/index.js +22 -81
- package/dist/lib/application-events.js +1 -4
- package/dist/lib/application.d.ts +26 -16
- package/dist/lib/application.js +222 -242
- package/dist/lib/cli.js +3 -40
- package/dist/lib/converter/comments/blockLexer.d.ts +1 -1
- package/dist/lib/converter/comments/blockLexer.js +24 -30
- package/dist/lib/converter/comments/declarationReference.js +10 -21
- package/dist/lib/converter/comments/declarationReferenceResolver.d.ts +2 -2
- package/dist/lib/converter/comments/declarationReferenceResolver.js +40 -36
- package/dist/lib/converter/comments/discovery.d.ts +4 -4
- package/dist/lib/converter/comments/discovery.js +172 -148
- package/dist/lib/converter/comments/index.d.ts +4 -4
- package/dist/lib/converter/comments/index.js +39 -50
- package/dist/lib/converter/comments/lexer.d.ts +1 -1
- package/dist/lib/converter/comments/lexer.js +2 -5
- package/dist/lib/converter/comments/lineLexer.d.ts +1 -1
- package/dist/lib/converter/comments/lineLexer.js +12 -15
- package/dist/lib/converter/comments/linkResolver.d.ts +2 -2
- package/dist/lib/converter/comments/linkResolver.js +14 -21
- package/dist/lib/converter/comments/parser.d.ts +6 -6
- package/dist/lib/converter/comments/parser.js +69 -96
- package/dist/lib/converter/comments/rawLexer.d.ts +1 -1
- package/dist/lib/converter/comments/rawLexer.js +13 -16
- package/dist/lib/converter/comments/tagName.js +1 -4
- package/dist/lib/converter/comments/textParser.d.ts +4 -4
- package/dist/lib/converter/comments/textParser.js +28 -30
- package/dist/lib/converter/components.d.ts +2 -3
- package/dist/lib/converter/components.js +2 -7
- package/dist/lib/converter/context.d.ts +9 -9
- package/dist/lib/converter/context.js +54 -44
- package/dist/lib/converter/convert-expression.js +16 -23
- package/dist/lib/converter/converter-events.d.ts +1 -0
- package/dist/lib/converter/converter-events.js +2 -4
- package/dist/lib/converter/converter.d.ts +16 -13
- package/dist/lib/converter/converter.js +210 -238
- package/dist/lib/converter/factories/index-signature.d.ts +1 -1
- package/dist/lib/converter/factories/index-signature.js +11 -17
- package/dist/lib/converter/factories/signature.d.ts +2 -2
- package/dist/lib/converter/factories/signature.js +95 -106
- package/dist/lib/converter/index.d.ts +6 -7
- package/dist/lib/converter/index.js +3 -11
- package/dist/lib/converter/jsdoc.d.ts +1 -1
- package/dist/lib/converter/jsdoc.js +34 -41
- package/dist/lib/converter/plugins/CategoryPlugin.d.ts +6 -21
- package/dist/lib/converter/plugins/CategoryPlugin.js +57 -139
- package/dist/lib/converter/plugins/CommentPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/CommentPlugin.js +153 -163
- package/dist/lib/converter/plugins/GroupPlugin.d.ts +10 -9
- package/dist/lib/converter/plugins/GroupPlugin.js +87 -124
- package/dist/lib/converter/plugins/ImplementsPlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/ImplementsPlugin.js +255 -321
- package/dist/lib/converter/plugins/IncludePlugin.d.ts +11 -0
- package/dist/lib/converter/plugins/IncludePlugin.js +72 -0
- package/dist/lib/converter/plugins/InheritDocPlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/InheritDocPlugin.js +41 -72
- package/dist/lib/converter/plugins/LinkResolverPlugin.d.ts +5 -5
- package/dist/lib/converter/plugins/LinkResolverPlugin.js +37 -58
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.d.ts +12 -0
- package/dist/lib/converter/plugins/MergeModuleWithPlugin.js +49 -0
- package/dist/lib/converter/plugins/PackagePlugin.d.ts +4 -3
- package/dist/lib/converter/plugins/PackagePlugin.js +62 -111
- package/dist/lib/converter/plugins/SourcePlugin.d.ts +3 -5
- package/dist/lib/converter/plugins/SourcePlugin.js +69 -110
- package/dist/lib/converter/plugins/TypePlugin.d.ts +4 -6
- package/dist/lib/converter/plugins/TypePlugin.js +95 -158
- package/dist/lib/converter/plugins/index.d.ts +10 -9
- package/dist/lib/converter/plugins/index.js +10 -21
- package/dist/lib/converter/symbols.d.ts +1 -1
- package/dist/lib/converter/symbols.js +234 -227
- package/dist/lib/converter/types.d.ts +2 -2
- package/dist/lib/converter/types.js +252 -237
- package/dist/lib/converter/utils/nodes.js +5 -13
- package/dist/lib/converter/utils/reflections.d.ts +1 -1
- package/dist/lib/converter/utils/reflections.js +4 -7
- package/dist/lib/converter/utils/repository.d.ts +1 -1
- package/dist/lib/converter/utils/repository.js +103 -97
- package/dist/lib/converter/utils/symbols.js +3 -9
- package/dist/lib/internationalization/index.d.ts +3 -4
- package/dist/lib/internationalization/index.js +3 -8
- package/dist/lib/internationalization/internationalization.d.ts +5 -4
- package/dist/lib/internationalization/internationalization.js +97 -103
- package/dist/lib/internationalization/locale-utils.cjs +8 -0
- package/dist/lib/internationalization/locale-utils.d.cts +8 -0
- package/dist/lib/internationalization/locales/en.cjs +366 -2
- package/dist/lib/internationalization/locales/en.d.cts +339 -2
- package/dist/lib/internationalization/locales/jp.cjs +8 -11
- package/dist/lib/internationalization/locales/jp.d.cts +310 -1
- package/dist/lib/internationalization/locales/ko.cjs +7 -9
- package/dist/lib/internationalization/locales/ko.d.cts +223 -1
- package/dist/lib/internationalization/locales/zh.cjs +7 -10
- package/dist/lib/internationalization/locales/zh.d.cts +381 -1
- package/dist/lib/internationalization/translatable.d.ts +4 -327
- package/dist/lib/internationalization/translatable.js +2 -360
- package/dist/lib/models/FileRegistry.d.ts +20 -9
- package/dist/lib/models/FileRegistry.js +54 -45
- package/dist/lib/models/ReflectionCategory.d.ts +2 -2
- package/dist/lib/models/ReflectionCategory.js +16 -12
- package/dist/lib/models/ReflectionGroup.d.ts +3 -3
- package/dist/lib/models/ReflectionGroup.js +23 -14
- package/dist/lib/models/comments/comment.d.ts +23 -37
- package/dist/lib/models/comments/comment.js +388 -325
- package/dist/lib/models/comments/index.d.ts +2 -2
- package/dist/lib/models/comments/index.js +1 -6
- package/dist/lib/models/index.d.ts +7 -7
- package/dist/lib/models/index.js +7 -23
- package/dist/lib/models/reflections/ReflectionSymbolId.d.ts +2 -2
- package/dist/lib/models/reflections/ReflectionSymbolId.js +42 -34
- package/dist/lib/models/reflections/abstract.d.ts +17 -20
- package/dist/lib/models/reflections/abstract.js +249 -256
- package/dist/lib/models/reflections/container.d.ts +7 -7
- package/dist/lib/models/reflections/container.js +43 -16
- package/dist/lib/models/reflections/declaration.d.ts +15 -12
- package/dist/lib/models/reflections/declaration.js +150 -29
- package/dist/lib/models/reflections/document.d.ts +3 -3
- package/dist/lib/models/reflections/document.js +26 -13
- package/dist/lib/models/reflections/index.d.ts +15 -15
- package/dist/lib/models/reflections/index.js +12 -31
- package/dist/lib/models/reflections/kind.d.ts +1 -1
- package/dist/lib/models/reflections/kind.js +3 -6
- package/dist/lib/models/reflections/parameter.d.ts +5 -4
- package/dist/lib/models/reflections/parameter.js +11 -13
- package/dist/lib/models/reflections/project.d.ts +14 -9
- package/dist/lib/models/reflections/project.js +104 -56
- package/dist/lib/models/reflections/reference.d.ts +3 -3
- package/dist/lib/models/reflections/reference.js +6 -9
- package/dist/lib/models/reflections/signature.d.ts +8 -8
- package/dist/lib/models/reflections/signature.js +35 -14
- package/dist/lib/models/reflections/type-parameter.d.ts +5 -5
- package/dist/lib/models/reflections/type-parameter.js +9 -10
- package/dist/lib/models/reflections/utils.js +1 -4
- package/dist/lib/models/reflections/variant.d.ts +8 -7
- package/dist/lib/models/reflections/variant.js +1 -2
- package/dist/lib/models/sources/file.d.ts +2 -2
- package/dist/lib/models/sources/file.js +22 -5
- package/dist/lib/models/sources/index.d.ts +1 -1
- package/dist/lib/models/sources/index.js +1 -5
- package/dist/lib/models/types.d.ts +26 -13
- package/dist/lib/models/types.js +236 -151
- package/dist/lib/output/components.d.ts +5 -11
- package/dist/lib/output/components.js +84 -125
- package/dist/lib/output/events.d.ts +3 -3
- package/dist/lib/output/events.js +128 -94
- package/dist/lib/output/formatter.d.ts +84 -0
- package/dist/lib/output/formatter.js +619 -0
- package/dist/lib/output/index.d.ts +9 -8
- package/dist/lib/output/index.js +7 -19
- package/dist/lib/output/models/UrlMapping.d.ts +2 -2
- package/dist/lib/output/models/UrlMapping.js +4 -5
- package/dist/lib/output/output.d.ts +13 -0
- package/dist/lib/output/output.js +72 -0
- package/dist/lib/output/plugins/AssetsPlugin.d.ts +7 -8
- package/dist/lib/output/plugins/AssetsPlugin.js +62 -80
- package/dist/lib/output/plugins/IconsPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/IconsPlugin.js +28 -84
- package/dist/lib/output/plugins/JavascriptIndexPlugin.d.ts +9 -2
- package/dist/lib/output/plugins/JavascriptIndexPlugin.js +90 -96
- package/dist/lib/output/plugins/NavigationPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/NavigationPlugin.js +22 -102
- package/dist/lib/output/plugins/SitemapPlugin.d.ts +3 -2
- package/dist/lib/output/plugins/SitemapPlugin.js +60 -120
- package/dist/lib/output/plugins/index.d.ts +6 -6
- package/dist/lib/output/plugins/index.js +6 -15
- package/dist/lib/output/renderer.d.ts +14 -13
- package/dist/lib/output/renderer.js +129 -185
- package/dist/lib/output/theme.d.ts +9 -5
- package/dist/lib/output/theme.js +14 -62
- package/dist/lib/output/themes/MarkedPlugin.d.ts +8 -9
- package/dist/lib/output/themes/MarkedPlugin.js +152 -117
- package/dist/lib/output/themes/default/DefaultTheme.d.ts +17 -29
- package/dist/lib/output/themes/default/DefaultTheme.js +334 -310
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.d.ts +63 -48
- package/dist/lib/output/themes/default/DefaultThemeRenderContext.js +119 -95
- package/dist/lib/output/themes/default/Slugger.d.ts +13 -0
- package/dist/lib/output/themes/default/Slugger.js +46 -0
- package/dist/lib/output/themes/default/layouts/default.d.ts +5 -5
- package/dist/lib/output/themes/default/layouts/default.js +67 -34
- package/dist/lib/output/themes/default/partials/anchor-icon.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/anchor-icon.js +4 -7
- package/dist/lib/output/themes/default/partials/breadcrumb.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/breadcrumb.js +4 -8
- package/dist/lib/output/themes/default/partials/comment.d.ts +6 -4
- package/dist/lib/output/themes/default/partials/comment.js +52 -29
- package/dist/lib/output/themes/default/partials/footer.d.ts +2 -2
- package/dist/lib/output/themes/default/partials/footer.js +11 -14
- package/dist/lib/output/themes/default/partials/header.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/header.js +9 -13
- package/dist/lib/output/themes/default/partials/hierarchy.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/hierarchy.js +9 -12
- package/dist/lib/output/themes/default/partials/icon.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/icon.js +78 -73
- package/dist/lib/output/themes/default/partials/index.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/index.js +19 -22
- package/dist/lib/output/themes/default/partials/member.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.declaration.js +18 -61
- package/dist/lib/output/themes/default/partials/member.getterSetter.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.getterSetter.js +10 -26
- package/dist/lib/output/themes/default/partials/member.js +19 -24
- package/dist/lib/output/themes/default/partials/member.signature.body.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signature.body.js +17 -21
- package/dist/lib/output/themes/default/partials/member.signature.title.d.ts +4 -7
- package/dist/lib/output/themes/default/partials/member.signature.title.js +8 -35
- package/dist/lib/output/themes/default/partials/member.signatures.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.signatures.js +9 -13
- package/dist/lib/output/themes/default/partials/member.sources.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/member.sources.js +13 -17
- package/dist/lib/output/themes/default/partials/members.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/members.js +10 -42
- package/dist/lib/output/themes/default/partials/moduleReflection.d.ts +5 -0
- package/dist/lib/output/themes/default/partials/moduleReflection.js +62 -0
- package/dist/lib/output/themes/default/partials/navigation.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/navigation.js +51 -62
- package/dist/lib/output/themes/default/partials/reflectionPreview.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/reflectionPreview.js +12 -15
- package/dist/lib/output/themes/default/partials/toolbar.d.ts +4 -4
- package/dist/lib/output/themes/default/partials/toolbar.js +16 -20
- package/dist/lib/output/themes/default/partials/type.d.ts +4 -6
- package/dist/lib/output/themes/default/partials/type.js +8 -388
- package/dist/lib/output/themes/default/partials/typeAndParent.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeAndParent.js +11 -15
- package/dist/lib/output/themes/default/partials/typeDetails.d.ts +8 -0
- package/dist/lib/output/themes/default/partials/typeDetails.js +221 -0
- package/dist/lib/output/themes/default/partials/typeParameters.d.ts +3 -3
- package/dist/lib/output/themes/default/partials/typeParameters.js +14 -17
- package/dist/lib/output/themes/default/templates/document.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/document.js +3 -7
- package/dist/lib/output/themes/default/templates/hierarchy.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/hierarchy.js +10 -13
- package/dist/lib/output/themes/default/templates/index.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/index.js +3 -7
- package/dist/lib/output/themes/default/templates/reflection.d.ts +4 -4
- package/dist/lib/output/themes/default/templates/reflection.js +31 -34
- package/dist/lib/output/themes/lib.d.ts +17 -3
- package/dist/lib/output/themes/lib.js +110 -49
- package/dist/lib/serialization/components.d.ts +2 -5
- package/dist/lib/serialization/components.js +1 -2
- package/dist/lib/serialization/deserializer.d.ts +21 -7
- package/dist/lib/serialization/deserializer.js +138 -123
- package/dist/lib/serialization/events.d.ts +2 -2
- package/dist/lib/serialization/events.js +6 -5
- package/dist/lib/serialization/index.d.ts +5 -5
- package/dist/lib/serialization/index.js +4 -33
- package/dist/lib/serialization/schema.d.ts +8 -2
- package/dist/lib/serialization/schema.js +2 -2
- package/dist/lib/serialization/serializer.d.ts +11 -5
- package/dist/lib/serialization/serializer.js +32 -25
- package/dist/lib/utils/array.d.ts +3 -0
- package/dist/lib/utils/array.js +26 -27
- package/dist/lib/utils/component.d.ts +2 -44
- package/dist/lib/utils/component.js +10 -102
- package/dist/lib/utils/entry-point.d.ts +3 -4
- package/dist/lib/utils/entry-point.js +114 -85
- package/dist/lib/utils/enum.js +6 -14
- package/dist/lib/utils/events.js +6 -12
- package/dist/lib/utils/fs.js +50 -91
- package/dist/lib/utils/general.d.ts +2 -1
- package/dist/lib/utils/general.js +50 -40
- package/dist/lib/utils/highlighter.js +30 -57
- package/dist/lib/utils/hooks.js +7 -13
- package/dist/lib/utils/html-entities.d.ts +8926 -0
- package/dist/lib/utils/html-entities.js +2329 -0
- package/dist/lib/utils/html.d.ts +8 -0
- package/dist/lib/utils/html.js +81 -34
- package/dist/lib/utils/index.d.ts +22 -22
- package/dist/lib/utils/index.js +20 -91
- package/dist/lib/utils/jsx.d.ts +12 -5
- package/dist/lib/utils/jsx.elements.js +1 -4
- package/dist/lib/utils/jsx.js +53 -20
- package/dist/lib/utils/loggers.d.ts +3 -3
- package/dist/lib/utils/loggers.js +36 -46
- package/dist/lib/utils/map.d.ts +1 -1
- package/dist/lib/utils/map.js +6 -13
- package/dist/lib/utils/minimalSourceFile.js +5 -7
- package/dist/lib/utils/options/declaration.d.ts +33 -7
- package/dist/lib/utils/options/declaration.js +20 -22
- package/dist/lib/utils/options/defaults.d.ts +3 -2
- package/dist/lib/utils/options/defaults.js +18 -38
- package/dist/lib/utils/options/help.d.ts +2 -2
- package/dist/lib/utils/options/help.js +7 -10
- package/dist/lib/utils/options/index.d.ts +6 -6
- package/dist/lib/utils/options/index.js +4 -18
- package/dist/lib/utils/options/options.d.ts +8 -5
- package/dist/lib/utils/options/options.js +47 -71
- package/dist/lib/utils/options/readers/arguments.d.ts +2 -2
- package/dist/lib/utils/options/readers/arguments.js +15 -17
- package/dist/lib/utils/options/readers/index.d.ts +4 -4
- package/dist/lib/utils/options/readers/index.js +4 -11
- package/dist/lib/utils/options/readers/package-json.d.ts +3 -3
- package/dist/lib/utils/options/readers/package-json.js +15 -21
- package/dist/lib/utils/options/readers/tsconfig.d.ts +2 -2
- package/dist/lib/utils/options/readers/tsconfig.js +54 -63
- package/dist/lib/utils/options/readers/typedoc.d.ts +3 -3
- package/dist/lib/utils/options/readers/typedoc.js +47 -90
- package/dist/lib/utils/options/sources/index.d.ts +1 -1
- package/dist/lib/utils/options/sources/index.js +1 -5
- package/dist/lib/utils/options/sources/typedoc.d.ts +1 -1
- package/dist/lib/utils/options/sources/typedoc.js +220 -196
- package/dist/lib/utils/options/tsdoc-defaults.d.ts +3 -3
- package/dist/lib/utils/options/tsdoc-defaults.js +16 -12
- package/dist/lib/utils/package-manifest.d.ts +1 -1
- package/dist/lib/utils/package-manifest.js +15 -19
- package/dist/lib/utils/paths.js +9 -15
- package/dist/lib/utils/perf.js +6 -11
- package/dist/lib/utils/plugins.d.ts +1 -1
- package/dist/lib/utils/plugins.js +16 -17
- package/dist/lib/utils/reflections.d.ts +1 -1
- package/dist/lib/utils/reflections.js +9 -12
- package/dist/lib/utils/set.js +2 -6
- package/dist/lib/utils/sort.d.ts +3 -3
- package/dist/lib/utils/sort.js +20 -24
- package/dist/lib/utils/tsconfig.d.ts +1 -1
- package/dist/lib/utils/tsconfig.js +13 -21
- package/dist/lib/utils/tsutils.d.ts +1 -1
- package/dist/lib/utils/tsutils.js +3 -30
- package/dist/lib/utils/validation.js +6 -12
- package/dist/lib/validation/documentation.d.ts +2 -2
- package/dist/lib/validation/documentation.js +26 -29
- package/dist/lib/validation/exports.d.ts +2 -2
- package/dist/lib/validation/exports.js +9 -11
- package/dist/lib/validation/links.d.ts +2 -2
- package/dist/lib/validation/links.js +4 -7
- package/dist/lib/validation/unusedMergeModuleWith.d.ts +3 -0
- package/dist/lib/validation/unusedMergeModuleWith.js +11 -0
- package/package.json +14 -11
- package/static/main.js +4 -4
- package/static/style.css +91 -2
- package/tsdoc.json +30 -0
- package/dist/lib/output/themes/default/partials/member.reference.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/member.reference.js +0 -30
- package/dist/lib/output/themes/default/partials/parameter.d.ts +0 -4
- package/dist/lib/output/themes/default/partials/parameter.js +0 -79
- package/dist/lib/utils/html-entities.json +0 -2326
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const tsdocBlockTags: readonly ["@defaultValue", "@deprecated", "@example", "@param", "@privateRemarks", "@remarks", "@returns", "@see", "@throws", "@typeParam"];
|
|
2
|
-
export declare const blockTags: readonly ["@defaultValue", "@deprecated", "@example", "@param", "@privateRemarks", "@remarks", "@returns", "@see", "@throws", "@typeParam", "@author", "@callback", "@category", "@categoryDescription", "@default", "@document", "@extends", "@augments", "@yields", "@group", "@groupDescription", "@import", "@inheritDoc", "@jsx", "@license", "@module", "@prop", "@property", "@return", "@satisfies", "@since", "@template", "@type", "@typedef"];
|
|
2
|
+
export declare const blockTags: readonly ["@defaultValue", "@deprecated", "@example", "@param", "@privateRemarks", "@remarks", "@returns", "@see", "@throws", "@typeParam", "@author", "@callback", "@category", "@categoryDescription", "@default", "@document", "@extends", "@augments", "@yields", "@group", "@groupDescription", "@import", "@inheritDoc", "@jsx", "@license", "@module", "@mergeModuleWith", "@prop", "@property", "@return", "@satisfies", "@since", "@template", "@type", "@typedef", "@summary"];
|
|
3
3
|
export declare const tsdocInlineTags: readonly ["@link", "@inheritDoc", "@label"];
|
|
4
|
-
export declare const inlineTags: readonly ["@link", "@inheritDoc", "@label", "@linkcode", "@linkplain"];
|
|
4
|
+
export declare const inlineTags: readonly ["@link", "@inheritDoc", "@label", "@linkcode", "@linkplain", "@include", "@includeCode"];
|
|
5
5
|
export declare const tsdocModifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual"];
|
|
6
|
-
export declare const modifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual", "@abstract", "@class", "@enum", "@event", "@hidden", "@hideCategories", "@hideconstructor", "@hideGroups", "@ignore", "@interface", "@namespace", "@overload", "@private", "@protected", "@showCategories", "@showGroups"];
|
|
6
|
+
export declare const modifierTags: readonly ["@alpha", "@beta", "@eventProperty", "@experimental", "@internal", "@override", "@packageDocumentation", "@public", "@readonly", "@sealed", "@virtual", "@abstract", "@class", "@enum", "@event", "@expand", "@hidden", "@hideCategories", "@hideconstructor", "@hideGroups", "@ignore", "@inline", "@interface", "@namespace", "@overload", "@private", "@protected", "@showCategories", "@showGroups", "@useDeclaredType"];
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// If updating these lists, also update tsdoc.json
|
|
3
|
-
|
|
4
|
-
exports.modifierTags = exports.tsdocModifierTags = exports.inlineTags = exports.tsdocInlineTags = exports.blockTags = exports.tsdocBlockTags = void 0;
|
|
5
|
-
exports.tsdocBlockTags = [
|
|
2
|
+
export const tsdocBlockTags = [
|
|
6
3
|
"@defaultValue",
|
|
7
4
|
"@deprecated",
|
|
8
5
|
"@example",
|
|
@@ -14,8 +11,8 @@ exports.tsdocBlockTags = [
|
|
|
14
11
|
"@throws",
|
|
15
12
|
"@typeParam",
|
|
16
13
|
];
|
|
17
|
-
|
|
18
|
-
...
|
|
14
|
+
export const blockTags = [
|
|
15
|
+
...tsdocBlockTags,
|
|
19
16
|
"@author",
|
|
20
17
|
"@callback",
|
|
21
18
|
"@category",
|
|
@@ -32,6 +29,7 @@ exports.blockTags = [
|
|
|
32
29
|
"@jsx",
|
|
33
30
|
"@license",
|
|
34
31
|
"@module",
|
|
32
|
+
"@mergeModuleWith",
|
|
35
33
|
"@prop",
|
|
36
34
|
"@property",
|
|
37
35
|
"@return",
|
|
@@ -40,14 +38,17 @@ exports.blockTags = [
|
|
|
40
38
|
"@template", // Alias for @typeParam
|
|
41
39
|
"@type",
|
|
42
40
|
"@typedef",
|
|
41
|
+
"@summary",
|
|
43
42
|
];
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
...
|
|
43
|
+
export const tsdocInlineTags = ["@link", "@inheritDoc", "@label"];
|
|
44
|
+
export const inlineTags = [
|
|
45
|
+
...tsdocInlineTags,
|
|
47
46
|
"@linkcode",
|
|
48
47
|
"@linkplain",
|
|
48
|
+
"@include",
|
|
49
|
+
"@includeCode",
|
|
49
50
|
];
|
|
50
|
-
|
|
51
|
+
export const tsdocModifierTags = [
|
|
51
52
|
"@alpha",
|
|
52
53
|
"@beta",
|
|
53
54
|
"@eventProperty",
|
|
@@ -60,17 +61,19 @@ exports.tsdocModifierTags = [
|
|
|
60
61
|
"@sealed",
|
|
61
62
|
"@virtual",
|
|
62
63
|
];
|
|
63
|
-
|
|
64
|
-
...
|
|
64
|
+
export const modifierTags = [
|
|
65
|
+
...tsdocModifierTags,
|
|
65
66
|
"@abstract",
|
|
66
67
|
"@class",
|
|
67
68
|
"@enum",
|
|
68
69
|
"@event",
|
|
70
|
+
"@expand",
|
|
69
71
|
"@hidden",
|
|
70
72
|
"@hideCategories",
|
|
71
73
|
"@hideconstructor",
|
|
72
74
|
"@hideGroups",
|
|
73
75
|
"@ignore",
|
|
76
|
+
"@inline",
|
|
74
77
|
"@interface",
|
|
75
78
|
"@namespace",
|
|
76
79
|
"@overload",
|
|
@@ -78,4 +81,5 @@ exports.modifierTags = [
|
|
|
78
81
|
"@protected",
|
|
79
82
|
"@showCategories",
|
|
80
83
|
"@showGroups",
|
|
84
|
+
"@useDeclaredType",
|
|
81
85
|
];
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Utilities to support the inspection of node package "manifests"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const path_1 = require("path");
|
|
7
|
-
const fs_1 = require("./fs");
|
|
8
|
-
const paths_1 = require("./paths");
|
|
2
|
+
import { dirname, resolve } from "path";
|
|
3
|
+
import { readFile, glob } from "./fs.js";
|
|
4
|
+
import { matchesAny, nicePath } from "./paths.js";
|
|
9
5
|
/**
|
|
10
6
|
* Helper for the TS type system to understand hasOwnProperty
|
|
11
7
|
* and narrow a type appropriately.
|
|
@@ -18,10 +14,10 @@ function hasOwnProperty(obj, prop) {
|
|
|
18
14
|
/**
|
|
19
15
|
* Loads a package.json and validates that it is a JSON Object
|
|
20
16
|
*/
|
|
21
|
-
function loadPackageManifest(logger, packageJsonPath) {
|
|
22
|
-
const packageJson = JSON.parse(
|
|
17
|
+
export function loadPackageManifest(logger, packageJsonPath) {
|
|
18
|
+
const packageJson = JSON.parse(readFile(packageJsonPath));
|
|
23
19
|
if (typeof packageJson !== "object" || !packageJson) {
|
|
24
|
-
logger.error(logger.i18n.file_0_not_an_object(
|
|
20
|
+
logger.error(logger.i18n.file_0_not_an_object(nicePath(packageJsonPath)));
|
|
25
21
|
return undefined;
|
|
26
22
|
}
|
|
27
23
|
return packageJson;
|
|
@@ -51,24 +47,24 @@ function getPackagePaths(packageJSON) {
|
|
|
51
47
|
* Given a list of (potentially wildcard containing) package paths,
|
|
52
48
|
* return all the actual package folders found.
|
|
53
49
|
*/
|
|
54
|
-
function expandPackages(logger, packageJsonDir, workspaces, exclude) {
|
|
50
|
+
export function expandPackages(logger, packageJsonDir, workspaces, exclude) {
|
|
55
51
|
// Technically npm and Yarn workspaces don't support recursive nesting,
|
|
56
52
|
// however we support the passing of paths to either packages or
|
|
57
53
|
// to the root of a workspace tree in our params and so we could here
|
|
58
54
|
// be dealing with either a root or a leaf. So let's do this recursively,
|
|
59
55
|
// as it actually is simpler from an implementation perspective anyway.
|
|
60
56
|
return workspaces.flatMap((workspace) => {
|
|
61
|
-
const expandedPackageJsonPaths =
|
|
57
|
+
const expandedPackageJsonPaths = glob(resolve(packageJsonDir, workspace, "package.json"), resolve(packageJsonDir));
|
|
62
58
|
if (expandedPackageJsonPaths.length === 0) {
|
|
63
|
-
logger.warn(logger.i18n.entry_point_0_did_not_match_any_packages(
|
|
59
|
+
logger.warn(logger.i18n.entry_point_0_did_not_match_any_packages(nicePath(workspace)));
|
|
64
60
|
}
|
|
65
|
-
else {
|
|
66
|
-
logger.verbose(`Expanded ${
|
|
67
|
-
.map(
|
|
61
|
+
else if (expandedPackageJsonPaths.length !== 1) {
|
|
62
|
+
logger.verbose(`Expanded ${nicePath(workspace)} to:\n\t${expandedPackageJsonPaths
|
|
63
|
+
.map(nicePath)
|
|
68
64
|
.join("\n\t")}`);
|
|
69
65
|
}
|
|
70
66
|
return expandedPackageJsonPaths.flatMap((packageJsonPath) => {
|
|
71
|
-
if (
|
|
67
|
+
if (matchesAny(exclude, dirname(packageJsonPath))) {
|
|
72
68
|
return [];
|
|
73
69
|
}
|
|
74
70
|
const packageJson = loadPackageManifest(logger, packageJsonPath);
|
|
@@ -78,10 +74,10 @@ function expandPackages(logger, packageJsonDir, workspaces, exclude) {
|
|
|
78
74
|
const packagePaths = getPackagePaths(packageJson);
|
|
79
75
|
if (packagePaths === undefined) {
|
|
80
76
|
// Assume this is a single package repo
|
|
81
|
-
return [
|
|
77
|
+
return [dirname(packageJsonPath)];
|
|
82
78
|
}
|
|
83
79
|
// This is a workspace root package, recurse
|
|
84
|
-
return expandPackages(logger,
|
|
80
|
+
return expandPackages(logger, dirname(packageJsonPath), packagePaths, exclude);
|
|
85
81
|
});
|
|
86
82
|
});
|
|
87
83
|
}
|
package/dist/lib/utils/paths.js
CHANGED
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.createMinimatch = createMinimatch;
|
|
4
|
-
exports.matchesAny = matchesAny;
|
|
5
|
-
exports.nicePath = nicePath;
|
|
6
|
-
exports.normalizePath = normalizePath;
|
|
7
|
-
const minimatch_1 = require("minimatch");
|
|
8
|
-
const path_1 = require("path");
|
|
1
|
+
import { Minimatch } from "minimatch";
|
|
2
|
+
import { isAbsolute, relative } from "path";
|
|
9
3
|
/**
|
|
10
4
|
* Convert array of glob patterns to array of minimatch instances.
|
|
11
5
|
*
|
|
12
6
|
* Handle a few Windows-Unix path gotchas.
|
|
13
7
|
*/
|
|
14
|
-
function createMinimatch(patterns) {
|
|
15
|
-
return patterns.map((pattern) => new
|
|
8
|
+
export function createMinimatch(patterns) {
|
|
9
|
+
return patterns.map((pattern) => new Minimatch(normalizePath(pattern).replace(/^\w:\//, ""), {
|
|
16
10
|
dot: true,
|
|
17
11
|
}));
|
|
18
12
|
}
|
|
19
|
-
function matchesAny(patterns, path) {
|
|
13
|
+
export function matchesAny(patterns, path) {
|
|
20
14
|
const normPath = normalizePath(path).replace(/^\w:\//, "");
|
|
21
15
|
return patterns.some((pat) => pat.match(normPath));
|
|
22
16
|
}
|
|
23
|
-
function nicePath(absPath) {
|
|
24
|
-
if (!
|
|
17
|
+
export function nicePath(absPath) {
|
|
18
|
+
if (!isAbsolute(absPath))
|
|
25
19
|
return absPath;
|
|
26
|
-
const relativePath =
|
|
20
|
+
const relativePath = relative(process.cwd(), absPath);
|
|
27
21
|
if (relativePath.startsWith("..")) {
|
|
28
22
|
return normalizePath(absPath);
|
|
29
23
|
}
|
|
@@ -35,7 +29,7 @@ function nicePath(absPath) {
|
|
|
35
29
|
* @param path The path that should be normalized.
|
|
36
30
|
* @returns The normalized path.
|
|
37
31
|
*/
|
|
38
|
-
function normalizePath(path) {
|
|
32
|
+
export function normalizePath(path) {
|
|
39
33
|
if (process.platform === "win32") {
|
|
40
34
|
// Ensure forward slashes
|
|
41
35
|
path = path.replace(/\\/g, "/");
|
package/dist/lib/utils/perf.js
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/* eslint-disable no-console */
|
|
3
|
-
|
|
4
|
-
exports.bench = bench;
|
|
5
|
-
exports.Bench = Bench;
|
|
6
|
-
exports.measure = measure;
|
|
7
|
-
const perf_hooks_1 = require("perf_hooks");
|
|
2
|
+
import { performance } from "perf_hooks";
|
|
8
3
|
const benchmarks = [];
|
|
9
|
-
function bench(fn, name = fn.name) {
|
|
4
|
+
export function bench(fn, name = fn.name) {
|
|
10
5
|
const matching = benchmarks.find((b) => b.name === name);
|
|
11
6
|
const timer = matching || {
|
|
12
7
|
name,
|
|
@@ -17,8 +12,8 @@ function bench(fn, name = fn.name) {
|
|
|
17
12
|
benchmarks.push(timer);
|
|
18
13
|
return function bench(...args) {
|
|
19
14
|
timer.calls++;
|
|
20
|
-
const start =
|
|
21
|
-
const end = () => (timer.time +=
|
|
15
|
+
const start = performance.now();
|
|
16
|
+
const end = () => (timer.time += performance.now() - start);
|
|
22
17
|
let result;
|
|
23
18
|
try {
|
|
24
19
|
result = fn.apply(this, args);
|
|
@@ -41,7 +36,7 @@ function bench(fn, name = fn.name) {
|
|
|
41
36
|
return result;
|
|
42
37
|
};
|
|
43
38
|
}
|
|
44
|
-
function Bench(value, context) {
|
|
39
|
+
export function Bench(value, context) {
|
|
45
40
|
let runner;
|
|
46
41
|
return function (...args) {
|
|
47
42
|
if (!runner) {
|
|
@@ -53,7 +48,7 @@ function Bench(value, context) {
|
|
|
53
48
|
return runner.apply(this, args);
|
|
54
49
|
};
|
|
55
50
|
}
|
|
56
|
-
function measure(cb) {
|
|
51
|
+
export function measure(cb) {
|
|
57
52
|
return bench(cb, "measure()")();
|
|
58
53
|
}
|
|
59
54
|
process.on("exit", () => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Application } from "../application";
|
|
1
|
+
import type { Application } from "../application.js";
|
|
2
2
|
export declare function loadPlugins(app: Application, plugins: readonly string[]): Promise<void>;
|
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const url_1 = require("url");
|
|
6
|
-
const paths_1 = require("./paths");
|
|
7
|
-
async function loadPlugins(app, plugins) {
|
|
1
|
+
import { isAbsolute } from "path";
|
|
2
|
+
import { pathToFileURL } from "url";
|
|
3
|
+
import { nicePath } from "./paths.js";
|
|
4
|
+
export async function loadPlugins(app, plugins) {
|
|
8
5
|
for (const plugin of plugins) {
|
|
9
6
|
const pluginDisplay = getPluginDisplayName(plugin);
|
|
10
7
|
try {
|
|
11
8
|
let instance;
|
|
9
|
+
// Try importing first to avoid warnings about requiring ESM being experimental.
|
|
10
|
+
// If that fails due to importing a directory, fall back to require.
|
|
12
11
|
try {
|
|
13
|
-
//
|
|
14
|
-
|
|
12
|
+
// On Windows, we need to ensure this path is a file path.
|
|
13
|
+
// Or we'll get ERR_UNSUPPORTED_ESM_URL_SCHEME
|
|
14
|
+
const esmPath = isAbsolute(plugin)
|
|
15
|
+
? pathToFileURL(plugin).toString()
|
|
16
|
+
: plugin;
|
|
17
|
+
instance = await import(esmPath);
|
|
15
18
|
}
|
|
16
19
|
catch (error) {
|
|
17
|
-
if (error.code === "
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
const esmPath = (0, path_1.isAbsolute)(plugin)
|
|
21
|
-
? (0, url_1.pathToFileURL)(plugin).toString()
|
|
22
|
-
: plugin;
|
|
23
|
-
instance = await import(esmPath);
|
|
20
|
+
if (error.code === "ERR_UNSUPPORTED_DIR_IMPORT") {
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
22
|
+
instance = require(plugin);
|
|
24
23
|
}
|
|
25
24
|
else {
|
|
26
25
|
throw error;
|
|
@@ -44,7 +43,7 @@ async function loadPlugins(app, plugins) {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
function getPluginDisplayName(plugin) {
|
|
47
|
-
const path =
|
|
46
|
+
const path = nicePath(plugin);
|
|
48
47
|
if (path.startsWith("./node_modules/")) {
|
|
49
48
|
return path.substring("./node_modules/".length);
|
|
50
49
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ProjectReflection, type ReferenceType, Reflection } from "../models";
|
|
1
|
+
import { type ProjectReflection, type ReferenceType, Reflection } from "../models/index.js";
|
|
2
2
|
export declare function discoverAllReferenceTypes(project: ProjectReflection, forExportValidation: boolean): {
|
|
3
3
|
type: ReferenceType;
|
|
4
4
|
owner: Reflection;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.discoverAllReferenceTypes = discoverAllReferenceTypes;
|
|
4
|
-
const models_1 = require("../models");
|
|
5
|
-
function discoverAllReferenceTypes(project, forExportValidation) {
|
|
1
|
+
import { ContainerReflection, DeclarationReflection, makeRecursiveVisitor, ParameterReflection, Reflection, SignatureReflection, TypeParameterReflection, } from "../models/index.js";
|
|
2
|
+
export function discoverAllReferenceTypes(project, forExportValidation) {
|
|
6
3
|
let current = project;
|
|
7
4
|
const queue = [];
|
|
8
5
|
const result = [];
|
|
9
|
-
const visitor =
|
|
6
|
+
const visitor = makeRecursiveVisitor({
|
|
10
7
|
reference(type) {
|
|
11
8
|
result.push({ type, owner: current });
|
|
12
9
|
},
|
|
@@ -17,7 +14,7 @@ function discoverAllReferenceTypes(project, forExportValidation) {
|
|
|
17
14
|
const add = (item) => {
|
|
18
15
|
if (!item)
|
|
19
16
|
return;
|
|
20
|
-
if (item instanceof
|
|
17
|
+
if (item instanceof Reflection) {
|
|
21
18
|
queue.push(item);
|
|
22
19
|
}
|
|
23
20
|
else {
|
|
@@ -25,10 +22,10 @@ function discoverAllReferenceTypes(project, forExportValidation) {
|
|
|
25
22
|
}
|
|
26
23
|
};
|
|
27
24
|
do {
|
|
28
|
-
if (current instanceof
|
|
25
|
+
if (current instanceof ContainerReflection) {
|
|
29
26
|
add(current.children);
|
|
30
27
|
}
|
|
31
|
-
if (current instanceof
|
|
28
|
+
if (current instanceof DeclarationReflection) {
|
|
32
29
|
current.type?.visit(visitor);
|
|
33
30
|
add(current.typeParameters);
|
|
34
31
|
add(current.signatures);
|
|
@@ -45,7 +42,7 @@ function discoverAllReferenceTypes(project, forExportValidation) {
|
|
|
45
42
|
current.implementedBy?.forEach((t) => t.visit(visitor));
|
|
46
43
|
}
|
|
47
44
|
}
|
|
48
|
-
if (current instanceof
|
|
45
|
+
if (current instanceof SignatureReflection) {
|
|
49
46
|
add(current.parameters);
|
|
50
47
|
add(current.typeParameters);
|
|
51
48
|
current.type?.visit(visitor);
|
|
@@ -55,10 +52,10 @@ function discoverAllReferenceTypes(project, forExportValidation) {
|
|
|
55
52
|
current.implementationOf?.visit(visitor);
|
|
56
53
|
}
|
|
57
54
|
}
|
|
58
|
-
if (current instanceof
|
|
55
|
+
if (current instanceof ParameterReflection) {
|
|
59
56
|
current.type?.visit(visitor);
|
|
60
57
|
}
|
|
61
|
-
if (current instanceof
|
|
58
|
+
if (current instanceof TypeParameterReflection) {
|
|
62
59
|
current.type?.visit(visitor);
|
|
63
60
|
current.default?.visit(visitor);
|
|
64
61
|
}
|
package/dist/lib/utils/set.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setIntersection = setIntersection;
|
|
4
|
-
exports.setDifference = setDifference;
|
|
5
|
-
function setIntersection(a, b) {
|
|
1
|
+
export function setIntersection(a, b) {
|
|
6
2
|
const result = new Set();
|
|
7
3
|
for (const elem of a) {
|
|
8
4
|
if (b.has(elem)) {
|
|
@@ -11,7 +7,7 @@ function setIntersection(a, b) {
|
|
|
11
7
|
}
|
|
12
8
|
return result;
|
|
13
9
|
}
|
|
14
|
-
function setDifference(a, b) {
|
|
10
|
+
export function setDifference(a, b) {
|
|
15
11
|
const result = new Set(a);
|
|
16
12
|
for (const elem of b) {
|
|
17
13
|
result.delete(elem);
|
package/dist/lib/utils/sort.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Module which handles sorting reflections according to a user specified strategy.
|
|
3
3
|
* @module
|
|
4
4
|
*/
|
|
5
|
-
import type { DeclarationReflection } from "../models/reflections/declaration";
|
|
6
|
-
import type { Options } from "./options";
|
|
7
|
-
import type { DocumentReflection } from "../models";
|
|
5
|
+
import type { DeclarationReflection } from "../models/reflections/declaration.js";
|
|
6
|
+
import type { Options } from "./options/index.js";
|
|
7
|
+
import type { DocumentReflection } from "../models/index.js";
|
|
8
8
|
export declare const SORT_STRATEGIES: readonly ["source-order", "alphabetical", "alphabetical-ignoring-documents", "enum-value-ascending", "enum-value-descending", "enum-member-source-order", "static-first", "instance-first", "visibility", "required-first", "kind", "external-last", "documents-first", "documents-last"];
|
|
9
9
|
export type SortStrategy = (typeof SORT_STRATEGIES)[number];
|
|
10
10
|
export declare function getSortFunction(opts: Options): (reflections: (DeclarationReflection | DocumentReflection)[]) => void;
|
package/dist/lib/utils/sort.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
/**
|
|
3
2
|
* Module which handles sorting reflections according to a user specified strategy.
|
|
4
3
|
* @module
|
|
5
4
|
*/
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const kind_1 = require("../models/reflections/kind");
|
|
10
|
-
const defaults_1 = require("./options/defaults");
|
|
11
|
-
exports.SORT_STRATEGIES = [
|
|
5
|
+
import { ReflectionKind } from "../models/reflections/kind.js";
|
|
6
|
+
import { OptionDefaults } from "./options/defaults.js";
|
|
7
|
+
export const SORT_STRATEGIES = [
|
|
12
8
|
"source-order",
|
|
13
9
|
"alphabetical",
|
|
14
10
|
"alphabetical-ignoring-documents",
|
|
@@ -49,15 +45,15 @@ const sorts = {
|
|
|
49
45
|
return a.name.localeCompare(b.name) < 0;
|
|
50
46
|
},
|
|
51
47
|
"alphabetical-ignoring-documents"(a, b) {
|
|
52
|
-
if (a.kindOf(
|
|
53
|
-
b.kindOf(
|
|
48
|
+
if (a.kindOf(ReflectionKind.Document) ||
|
|
49
|
+
b.kindOf(ReflectionKind.Document)) {
|
|
54
50
|
return false;
|
|
55
51
|
}
|
|
56
52
|
return a.name.localeCompare(b.name) < 0;
|
|
57
53
|
},
|
|
58
54
|
"enum-value-ascending"(a, b) {
|
|
59
|
-
if (a.kind ==
|
|
60
|
-
b.kind ==
|
|
55
|
+
if (a.kind == ReflectionKind.EnumMember &&
|
|
56
|
+
b.kind == ReflectionKind.EnumMember) {
|
|
61
57
|
const aRefl = a;
|
|
62
58
|
const bRefl = b;
|
|
63
59
|
const aValue = aRefl.type?.type === "literal" ? aRefl.type.value : -Infinity;
|
|
@@ -67,8 +63,8 @@ const sorts = {
|
|
|
67
63
|
return false;
|
|
68
64
|
},
|
|
69
65
|
"enum-value-descending"(a, b) {
|
|
70
|
-
if (a.kind ==
|
|
71
|
-
b.kind ==
|
|
66
|
+
if (a.kind == ReflectionKind.EnumMember &&
|
|
67
|
+
b.kind == ReflectionKind.EnumMember) {
|
|
72
68
|
const aRefl = a;
|
|
73
69
|
const bRefl = b;
|
|
74
70
|
const aValue = aRefl.type?.type === "literal" ? aRefl.type.value : -Infinity;
|
|
@@ -78,8 +74,8 @@ const sorts = {
|
|
|
78
74
|
return false;
|
|
79
75
|
},
|
|
80
76
|
"enum-member-source-order"(a, b, data) {
|
|
81
|
-
if (a.kind ===
|
|
82
|
-
b.kind ===
|
|
77
|
+
if (a.kind === ReflectionKind.EnumMember &&
|
|
78
|
+
b.kind === ReflectionKind.EnumMember) {
|
|
83
79
|
return sorts["source-order"](a, b, data);
|
|
84
80
|
}
|
|
85
81
|
return false;
|
|
@@ -115,21 +111,21 @@ const sorts = {
|
|
|
115
111
|
return !a.flags.isExternal && b.flags.isExternal;
|
|
116
112
|
},
|
|
117
113
|
"documents-first"(a, b) {
|
|
118
|
-
return (a.kindOf(
|
|
119
|
-
!b.kindOf(
|
|
114
|
+
return (a.kindOf(ReflectionKind.Document) &&
|
|
115
|
+
!b.kindOf(ReflectionKind.Document));
|
|
120
116
|
},
|
|
121
117
|
"documents-last"(a, b) {
|
|
122
|
-
return (!a.kindOf(
|
|
123
|
-
b.kindOf(
|
|
118
|
+
return (!a.kindOf(ReflectionKind.Document) &&
|
|
119
|
+
b.kindOf(ReflectionKind.Document));
|
|
124
120
|
},
|
|
125
121
|
};
|
|
126
|
-
function getSortFunction(opts) {
|
|
122
|
+
export function getSortFunction(opts) {
|
|
127
123
|
const kindSortOrder = opts
|
|
128
124
|
.getValue("kindSortOrder")
|
|
129
|
-
.map((k) =>
|
|
130
|
-
for (const kind of
|
|
131
|
-
if (!kindSortOrder.includes(
|
|
132
|
-
kindSortOrder.push(
|
|
125
|
+
.map((k) => ReflectionKind[k]);
|
|
126
|
+
for (const kind of OptionDefaults.kindSortOrder) {
|
|
127
|
+
if (!kindSortOrder.includes(ReflectionKind[kind])) {
|
|
128
|
+
kindSortOrder.push(ReflectionKind[kind]);
|
|
133
129
|
}
|
|
134
130
|
}
|
|
135
131
|
const strategies = opts.getValue("sort");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ts from "typescript";
|
|
2
|
-
import type { Logger } from "./loggers";
|
|
2
|
+
import type { Logger } from "./loggers.js";
|
|
3
3
|
export declare function findTsConfigFile(path: string): string | undefined;
|
|
4
4
|
export declare function getTypeDocOptionsFromTsConfig(file: string): any;
|
|
5
5
|
export declare function readTsConfig(path: string, logger: Logger): ts.ParsedCommandLine | undefined;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.findTsConfigFile = findTsConfigFile;
|
|
7
|
-
exports.getTypeDocOptionsFromTsConfig = getTypeDocOptionsFromTsConfig;
|
|
8
|
-
exports.readTsConfig = readTsConfig;
|
|
9
|
-
const typescript_1 = __importDefault(require("typescript"));
|
|
10
|
-
const fs_1 = require("./fs");
|
|
11
|
-
const module_1 = require("module");
|
|
12
|
-
function findTsConfigFile(path) {
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
import { isFile, isDir, readFile } from "./fs.js";
|
|
3
|
+
import { createRequire } from "module";
|
|
4
|
+
export function findTsConfigFile(path) {
|
|
13
5
|
let fileToRead = path;
|
|
14
|
-
if (
|
|
15
|
-
fileToRead =
|
|
6
|
+
if (isDir(fileToRead)) {
|
|
7
|
+
fileToRead = ts.findConfigFile(path, isFile);
|
|
16
8
|
}
|
|
17
|
-
if (!fileToRead || !
|
|
9
|
+
if (!fileToRead || !isFile(fileToRead)) {
|
|
18
10
|
return;
|
|
19
11
|
}
|
|
20
12
|
return fileToRead;
|
|
@@ -22,14 +14,14 @@ function findTsConfigFile(path) {
|
|
|
22
14
|
// We don't need recursive read checks because that would cause a diagnostic
|
|
23
15
|
// when reading the tsconfig for compiler options, which happens first, and we bail before
|
|
24
16
|
// doing this in that case.
|
|
25
|
-
function getTypeDocOptionsFromTsConfig(file) {
|
|
26
|
-
const readResult =
|
|
17
|
+
export function getTypeDocOptionsFromTsConfig(file) {
|
|
18
|
+
const readResult = ts.readConfigFile(file, readFile);
|
|
27
19
|
const result = {};
|
|
28
20
|
if (readResult.error) {
|
|
29
21
|
return result;
|
|
30
22
|
}
|
|
31
23
|
if ("extends" in readResult.config) {
|
|
32
|
-
const resolver =
|
|
24
|
+
const resolver = createRequire(file);
|
|
33
25
|
const extended = Array.isArray(readResult.config.extends)
|
|
34
26
|
? readResult.config.extends.map(String)
|
|
35
27
|
: [String(readResult.config.extends)];
|
|
@@ -50,12 +42,12 @@ function getTypeDocOptionsFromTsConfig(file) {
|
|
|
50
42
|
return result;
|
|
51
43
|
}
|
|
52
44
|
const tsConfigCache = {};
|
|
53
|
-
function readTsConfig(path, logger) {
|
|
45
|
+
export function readTsConfig(path, logger) {
|
|
54
46
|
if (tsConfigCache[path]) {
|
|
55
47
|
return tsConfigCache[path];
|
|
56
48
|
}
|
|
57
|
-
const parsed =
|
|
58
|
-
...
|
|
49
|
+
const parsed = ts.getParsedCommandLineOfConfigFile(path, {}, {
|
|
50
|
+
...ts.sys,
|
|
59
51
|
onUnRecoverableConfigFileDiagnostic: logger.diagnostic.bind(logger),
|
|
60
52
|
});
|
|
61
53
|
if (!parsed) {
|
|
@@ -1,32 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.getQualifiedName = getQualifiedName;
|
|
27
|
-
exports.getHumanName = getHumanName;
|
|
28
|
-
const ts = __importStar(require("typescript"));
|
|
29
|
-
function getQualifiedName(symbol, defaultName) {
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
export function getQualifiedName(symbol, defaultName) {
|
|
30
3
|
// Two implementation options for this one:
|
|
31
4
|
// 1. Use the internal symbol.parent, to walk up until we hit a source file symbol (if in a module)
|
|
32
5
|
// or undefined (if in a global file)
|
|
@@ -40,7 +13,7 @@ function getQualifiedName(symbol, defaultName) {
|
|
|
40
13
|
}
|
|
41
14
|
return parts.join(".") || defaultName;
|
|
42
15
|
}
|
|
43
|
-
function getHumanName(name) {
|
|
16
|
+
export function getHumanName(name) {
|
|
44
17
|
// Unique symbols get a name that will change between runs of the compiler.
|
|
45
18
|
const match = /^__@(.*)@\d+$/.exec(name);
|
|
46
19
|
if (match) {
|