Comparing version 0.23.27 to 0.23.28
@@ -12,2 +12,3 @@ "use strict"; | ||
const paths_1 = require("../../utils/paths"); | ||
const assert_1 = require("assert"); | ||
// Note: This does NOT include JSDoc syntax kinds. This is important! | ||
@@ -151,2 +152,16 @@ // Comments from @typedef and @callback tags are handled specially by | ||
} | ||
if (typescript_1.default.isJSDocSignature(node)) { | ||
const comment = node.parent.parent; | ||
(0, assert_1.ok)(typescript_1.default.isJSDoc(comment)); | ||
return [ | ||
node.getSourceFile(), | ||
[ | ||
{ | ||
kind: typescript_1.default.SyntaxKind.MultiLineCommentTrivia, | ||
pos: comment.pos, | ||
end: comment.end, | ||
}, | ||
], | ||
]; | ||
} | ||
const text = node.getSourceFile().text; | ||
@@ -153,0 +168,0 @@ const comments = collectCommentRanges(typescript_1.default.getLeadingCommentRanges(text, node.pos)); |
@@ -49,3 +49,3 @@ import ts from "typescript"; | ||
/** @internal */ | ||
get logger(): import("../utils/loggers").Logger; | ||
get logger(): import("../utils").Logger; | ||
/** | ||
@@ -52,0 +52,0 @@ * Return the compiler options. |
@@ -156,5 +156,11 @@ "use strict"; | ||
// so unfortunately we have to go back to the node for this... | ||
const variance = getVariance(param.getSymbol()?.declarations?.find(typescript_1.default.isTypeParameterDeclaration) | ||
?.modifiers); | ||
const declaration = param | ||
.getSymbol() | ||
?.declarations?.find(typescript_1.default.isTypeParameterDeclaration); | ||
const variance = getVariance(declaration?.modifiers); | ||
const paramRefl = new models_1.TypeParameterReflection(param.symbol.name, constraint, defaultType, parent, variance); | ||
// No way to determine this from the type parameter itself, need to go back to the declaration | ||
if (declaration?.modifiers?.some((m) => m.kind === typescript_1.default.SyntaxKind.ConstKeyword)) { | ||
paramRefl.flags.setFlag(models_1.ReflectionFlag.Const, true); | ||
} | ||
context.registerReflection(paramRefl, param.getSymbol()); | ||
@@ -177,2 +183,5 @@ context.trigger(converter_events_1.ConverterEvents.CREATE_TYPE_PARAMETER, paramRefl); | ||
const paramRefl = new models_1.TypeParameterReflection(param.name.text, constraint, defaultType, context.scope, getVariance(param.modifiers)); | ||
if (param.modifiers?.some((m) => m.kind === typescript_1.default.SyntaxKind.ConstKeyword)) { | ||
paramRefl.flags.setFlag(models_1.ReflectionFlag.Const, true); | ||
} | ||
context.registerReflection(paramRefl, param.symbol); | ||
@@ -179,0 +188,0 @@ if (typescript_1.default.isJSDocTemplateTag(param.parent)) { |
@@ -246,4 +246,4 @@ "use strict"; | ||
// or less signatures than declarations. | ||
for (let i = 0; i < signatures.length; i++) { | ||
(0, signature_1.createSignature)(scope, models_1.ReflectionKind.CallSignature, signatures[i], declarations[i]); | ||
for (const sig of signatures) { | ||
(0, signature_1.createSignature)(scope, models_1.ReflectionKind.CallSignature, sig); | ||
} | ||
@@ -550,4 +550,5 @@ } | ||
reflection.setFlag(models_1.ReflectionFlag.Optional, (0, enum_1.hasAllFlags)(symbol.flags, typescript_1.default.SymbolFlags.Optional)); | ||
reflection.setFlag(models_1.ReflectionFlag.Readonly, (0, enum_1.hasAllFlags)(symbol.checkFlags ?? 0, typescript_1.default.CheckFlags.Readonly) || | ||
(0, enum_1.hasAllFlags)(modifiers, typescript_1.default.ModifierFlags.Readonly)); | ||
reflection.setFlag(models_1.ReflectionFlag.Readonly, (0, enum_1.hasAllFlags)( | ||
// TS 4.9: symbol.checkFlags, links was introduced in 5.0 | ||
symbol.checkFlags ?? symbol.links?.checkFlags ?? 0, typescript_1.default.CheckFlags.Readonly) || (0, enum_1.hasAllFlags)(modifiers, typescript_1.default.ModifierFlags.Readonly)); | ||
reflection.setFlag(models_1.ReflectionFlag.Abstract, (0, enum_1.hasAllFlags)(modifiers, typescript_1.default.ModifierFlags.Abstract)); | ||
@@ -554,0 +555,0 @@ if (reflection.kindOf(models_1.ReflectionKind.Variable) && |
@@ -175,3 +175,2 @@ "use strict"; | ||
} | ||
exports.ReflectionFlags = ReflectionFlags; | ||
ReflectionFlags.serializedFlags = [ | ||
@@ -190,2 +189,3 @@ "isPrivate", | ||
]; | ||
exports.ReflectionFlags = ReflectionFlags; | ||
var TraverseProperty; | ||
@@ -192,0 +192,0 @@ (function (TraverseProperty) { |
@@ -59,3 +59,2 @@ "use strict"; | ||
} | ||
exports.RendererEvent = RendererEvent; | ||
/** | ||
@@ -71,2 +70,3 @@ * Triggered before the renderer starts rendering a project. | ||
RendererEvent.END = "endRender"; | ||
exports.RendererEvent = RendererEvent; | ||
/** | ||
@@ -81,3 +81,2 @@ * An event emitted by the {@link Renderer} class before and after the | ||
} | ||
exports.PageEvent = PageEvent; | ||
/** | ||
@@ -93,2 +92,3 @@ * Triggered before a document will be rendered. | ||
PageEvent.END = "endPage"; | ||
exports.PageEvent = PageEvent; | ||
/** | ||
@@ -106,3 +106,2 @@ * An event emitted when markdown is being parsed. Allows other plugins to manipulate the result. | ||
} | ||
exports.MarkdownEvent = MarkdownEvent; | ||
/** | ||
@@ -113,2 +112,3 @@ * Triggered on the renderer when this plugin parses a markdown string. | ||
MarkdownEvent.PARSE = "parseMarkdown"; | ||
exports.MarkdownEvent = MarkdownEvent; | ||
/** | ||
@@ -145,3 +145,2 @@ * An event emitted when the search index is being prepared. | ||
} | ||
exports.IndexEvent = IndexEvent; | ||
/** | ||
@@ -152,1 +151,2 @@ * Triggered on the renderer when the search index is being prepared. | ||
IndexEvent.PREPARE_INDEX = "prepareIndex"; | ||
exports.IndexEvent = IndexEvent; |
@@ -256,6 +256,6 @@ "use strict"; | ||
} | ||
DefaultTheme.URL_PREFIX = /^(http|ftp)s?:\/\//; | ||
exports.DefaultTheme = DefaultTheme; | ||
DefaultTheme.URL_PREFIX = /^(http|ftp)s?:\/\//; | ||
function hasReadme(readme) { | ||
return !readme.endsWith("none"); | ||
} |
@@ -11,2 +11,3 @@ "use strict"; | ||
utils_1.JSX.createElement("h4", null, | ||
item.flags.isConst && "const ", | ||
item.varianceModifier ? `${item.varianceModifier} ` : "", | ||
@@ -13,0 +14,0 @@ item.name, |
@@ -76,2 +76,3 @@ "use strict"; | ||
join(utils_1.JSX.createElement("span", { class: "tsd-signature-symbol" }, ", "), typeParameters, (item) => (utils_1.JSX.createElement(utils_1.JSX.Fragment, null, | ||
item.flags.isConst && "const ", | ||
item.varianceModifier ? `${item.varianceModifier} ` : "", | ||
@@ -78,0 +79,0 @@ utils_1.JSX.createElement("span", { class: "tsd-signature-type", "data-tsd-kind": item.kindString }, item.name)))), |
@@ -55,3 +55,2 @@ "use strict"; | ||
} | ||
exports.Serializer = Serializer; | ||
/** | ||
@@ -67,1 +66,2 @@ * Triggered when the {@link Serializer} begins transforming a project. | ||
Serializer.EVENT_END = "end"; | ||
exports.Serializer = Serializer; |
@@ -52,5 +52,5 @@ "use strict"; | ||
} | ||
exports.ComponentEvent = ComponentEvent; | ||
ComponentEvent.ADDED = "componentAdded"; | ||
ComponentEvent.REMOVED = "componentRemoved"; | ||
exports.ComponentEvent = ComponentEvent; | ||
/** | ||
@@ -57,0 +57,0 @@ * Component base class. Has an owner (unless it's the application root component), |
@@ -294,2 +294,3 @@ "use strict"; | ||
} | ||
const packageName = packageJson["name"]; | ||
if (includeVersion && !(0, validation_1.validate)({ version: String }, packageJson)) { | ||
@@ -299,4 +300,3 @@ logger.warn(`--includeVersion was specified, but "${(0, paths_1.nicePath)(packageJsonPath)}" does not properly specify a version.`); | ||
results.push({ | ||
displayName: typedocPackageConfig?.displayName ?? | ||
packageJson["name"], | ||
displayName: typedocPackageConfig?.displayName ?? packageName, | ||
version: includeVersion | ||
@@ -303,0 +303,0 @@ ? packageJson["version"] |
@@ -291,3 +291,8 @@ "use strict"; | ||
type: declaration_1.ParameterType.Array, | ||
defaultValue: ["@override", "@virtual", "@privateRemarks"], | ||
defaultValue: [ | ||
"@override", | ||
"@virtual", | ||
"@privateRemarks", | ||
"@satisfies", | ||
], | ||
validate(value) { | ||
@@ -294,0 +299,0 @@ if (!Validation.validate([Array, Validation.isTagString], value)) { |
export declare const tsdocBlockTags: readonly ["@deprecated", "@param", "@remarks", "@returns", "@throws", "@privateRemarks", "@defaultValue", "@typeParam"]; | ||
export declare const blockTags: readonly ["@deprecated", "@param", "@remarks", "@returns", "@throws", "@privateRemarks", "@defaultValue", "@typeParam", "@module", "@inheritDoc", "@group", "@category", "@template", "@type", "@typedef", "@callback", "@prop", "@property"]; | ||
export declare const blockTags: readonly ["@deprecated", "@param", "@remarks", "@returns", "@throws", "@privateRemarks", "@defaultValue", "@typeParam", "@module", "@inheritDoc", "@group", "@category", "@template", "@type", "@typedef", "@callback", "@prop", "@property", "@satisfies"]; | ||
export declare const tsdocInlineTags: readonly ["@link", "@inheritDoc", "@label"]; | ||
export declare const inlineTags: string[]; | ||
export declare const tsdocModifierTags: readonly ["@public", "@private", "@protected", "@internal", "@readonly", "@packageDocumentation", "@eventProperty", "@alpha", "@beta", "@experimental", "@sealed", "@override", "@virtual"]; | ||
export declare const modifierTags: readonly ["@public", "@private", "@protected", "@internal", "@readonly", "@packageDocumentation", "@eventProperty", "@alpha", "@beta", "@experimental", "@sealed", "@override", "@virtual", "@hidden", "@ignore", "@enum", "@event"]; | ||
export declare const modifierTags: readonly ["@public", "@private", "@protected", "@internal", "@readonly", "@packageDocumentation", "@eventProperty", "@alpha", "@beta", "@experimental", "@sealed", "@override", "@virtual", "@hidden", "@ignore", "@enum", "@event", "@overload"]; |
@@ -29,2 +29,3 @@ "use strict"; | ||
"@property", | ||
"@satisfies", | ||
]; | ||
@@ -54,2 +55,3 @@ exports.tsdocInlineTags = ["@link", "@inheritDoc", "@label"]; | ||
"@event", | ||
"@overload", | ||
]; |
@@ -47,9 +47,9 @@ "use strict"; | ||
if (hasOwnProperty(packageJson, "typedoc") && | ||
typeof packageJson.typedoc == "object" && | ||
packageJson.typedoc) { | ||
if (!(0, validation_1.validate)(typedocPackageManifestConfigSchema, packageJson.typedoc)) { | ||
typeof packageJson["typedoc"] == "object" && | ||
packageJson["typedoc"]) { | ||
if (!(0, validation_1.validate)(typedocPackageManifestConfigSchema, packageJson["typedoc"])) { | ||
logger.error(`Typedoc config extracted from package manifest file ${packageJsonPath} is not valid`); | ||
return undefined; | ||
} | ||
return packageJson.typedoc; | ||
return packageJson["typedoc"]; | ||
} | ||
@@ -56,0 +56,0 @@ return undefined; |
{ | ||
"name": "typedoc", | ||
"description": "Create api documentation for TypeScript projects.", | ||
"version": "0.23.27", | ||
"version": "0.23.28", | ||
"homepage": "https://typedoc.org", | ||
@@ -34,3 +34,3 @@ "main": "./dist/index.js", | ||
"peerDependencies": { | ||
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x" | ||
"typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" | ||
}, | ||
@@ -42,8 +42,8 @@ "devDependencies": { | ||
"@types/node": "14", | ||
"@typescript-eslint/eslint-plugin": "^5.51.0", | ||
"@typescript-eslint/parser": "^5.51.0", | ||
"@typescript-eslint/eslint-plugin": "^5.55.0", | ||
"@typescript-eslint/parser": "^5.55.0", | ||
"@typestrong/fs-fixture-builder": "github:TypeStrong/fs-fixture-builder#5a9486bc66f6e36988106685768396281f6cbc10", | ||
"c8": "^7.12.0", | ||
"esbuild": "^0.17.7", | ||
"eslint": "^8.34.0", | ||
"c8": "^7.13.0", | ||
"esbuild": "^0.17.12", | ||
"eslint": "^8.36.0", | ||
"mocha": "^10.2.0", | ||
@@ -53,3 +53,3 @@ "prettier": "2.8.4", | ||
"ts-node": "^10.9.1", | ||
"typescript": "4.9.5" | ||
"typescript": "5.0.2" | ||
}, | ||
@@ -56,0 +56,0 @@ "files": [ |
@@ -77,4 +77,12 @@ { | ||
"syntaxKind": "modifier" | ||
}, | ||
{ | ||
"tagName": "@satisfies", | ||
"syntaxKind": "block" | ||
}, | ||
{ | ||
"tagName": "@overload", | ||
"syntaxKind": "modifier" | ||
} | ||
] | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1075123
25122