Comparing version 0.27.4 to 0.27.5
/** | ||
* @module TypeDoc API | ||
* | ||
* In addition to the members documented here, TypeDoc exports a `typedoc/debug` | ||
* entry point which exports some functions which may be useful during plugin | ||
* development or debugging. Exports from that entry point are **not stable** | ||
* and may change or be removed at any time. | ||
*/ | ||
@@ -4,0 +9,0 @@ export { Application, type ApplicationEvents } from "./lib/application.js"; |
/** | ||
* @module TypeDoc API | ||
* | ||
* In addition to the members documented here, TypeDoc exports a `typedoc/debug` | ||
* entry point which exports some functions which may be useful during plugin | ||
* development or debugging. Exports from that entry point are **not stable** | ||
* and may change or be removed at any time. | ||
*/ | ||
@@ -4,0 +9,0 @@ export { Application } from "./lib/application.js"; |
@@ -110,4 +110,4 @@ import ts from "typescript"; | ||
// Markdown's code rules are a royal pain. This could be one of several things. | ||
// 1. Inline code: <1-n ticks><text><same number of ticks> | ||
// 2. Code block: <3 ticks><language, no ticks>\n<text>\n<3 ticks>\n | ||
// 1. Inline code: <1-n ticks><text without multiple consecutive newlines or ticks at start of line><same number of ticks> | ||
// 2. Code block: <newline><3+ ticks><language, no ticks>\n<text>\n<3 ticks>\n | ||
// 3. Unmatched tick(s), not code, but part of some text. | ||
@@ -117,3 +117,14 @@ // We don't quite handle #2 correctly yet. PR welcome! | ||
let tickCount = 1; | ||
let lookahead = pos; | ||
let lookahead = pos - 1; | ||
let atNewline = true; | ||
while (lookahead > 0 && file[lookahead] !== "\n") { | ||
if (/\S/.test(file[lookahead])) { | ||
if (!commentHasStars || file[lookahead] !== "*") { | ||
atNewline = false; | ||
break; | ||
} | ||
} | ||
--lookahead; | ||
} | ||
lookahead = pos; | ||
while (lookahead + 1 < end && file[lookahead + 1] === "`") { | ||
@@ -123,2 +134,3 @@ tickCount++; | ||
} | ||
const isCodeBlock = atNewline && tickCount >= 3; | ||
let lookaheadStart = pos; | ||
@@ -131,8 +143,14 @@ const codeText = []; | ||
codeText.push(file.substring(lookaheadStart, lookahead)); | ||
yield { | ||
kind: TokenSyntaxKind.Code, | ||
text: codeText.join(""), | ||
pos, | ||
}; | ||
pos = lookahead; | ||
const codeTextStr = codeText.join(""); | ||
if (isCodeBlock || !/\n\s*\n/.test(codeTextStr)) { | ||
yield { | ||
kind: TokenSyntaxKind.Code, | ||
text: codeTextStr, | ||
pos, | ||
}; | ||
pos = lookahead; | ||
} | ||
else { | ||
yield makeToken(TokenSyntaxKind.Text, tickCount); | ||
} | ||
break; | ||
@@ -174,3 +192,3 @@ } | ||
if (lookahead >= end && pos !== lookahead) { | ||
if (tickCount === 3 && | ||
if (isCodeBlock && | ||
file.substring(pos, end).includes("\n")) { | ||
@@ -177,0 +195,0 @@ codeText.push(file.substring(lookaheadStart, end)); |
@@ -177,4 +177,10 @@ import { ok } from "assert"; | ||
let low = []; | ||
if (!(refl instanceof ContainerReflection) || | ||
!refl.childrenIncludingDocuments) { | ||
let children; | ||
if (refl instanceof ContainerReflection) { | ||
children = refl.childrenIncludingDocuments; | ||
} | ||
if (!children && refl.isDeclaration() && refl.type?.type === "reflection") { | ||
children = refl.type.declaration.childrenIncludingDocuments; | ||
} | ||
if (!children) { | ||
return { high, low }; | ||
@@ -188,5 +194,5 @@ } | ||
case ".": | ||
high = refl.childrenIncludingDocuments.filter((r) => r.name === path.path && | ||
high = children.filter((r) => r.name === path.path && | ||
(r.kindOf(ReflectionKind.SomeExport) || r.flags.isStatic)); | ||
low = refl.childrenIncludingDocuments.filter((r) => r.name === path.path && | ||
low = children.filter((r) => r.name === path.path && | ||
(!r.kindOf(ReflectionKind.SomeExport) || !r.flags.isStatic)); | ||
@@ -198,3 +204,3 @@ break; | ||
high = | ||
refl.children?.filter((r) => { | ||
children?.filter((r) => { | ||
return (r.name === path.path && | ||
@@ -209,3 +215,3 @@ r.kindOf(ReflectionKind.SomeMember) && | ||
if (refl.kindOf(ReflectionKind.SomeModule | ReflectionKind.Project)) { | ||
high = refl.children?.filter((r) => r.name === path.path) || []; | ||
high = children?.filter((r) => r.name === path.path) || []; | ||
} | ||
@@ -212,0 +218,0 @@ break; |
@@ -68,3 +68,12 @@ import { TokenSyntaxKind } from "./lexer.js"; | ||
let tickCount = 1; | ||
let lookahead = pos; | ||
let lookahead = pos - 1; | ||
let atNewline = true; | ||
while (lookahead > 0 && file[lookahead] !== "\n") { | ||
if (/\S/.test(file[lookahead])) { | ||
atNewline = false; | ||
break; | ||
} | ||
--lookahead; | ||
} | ||
lookahead = pos; | ||
while (lookahead + 1 < end && file[lookahead + 1] === "`") { | ||
@@ -74,2 +83,3 @@ tickCount++; | ||
} | ||
const isCodeBlock = atNewline && tickCount >= 3; | ||
let lookaheadStart = pos; | ||
@@ -82,8 +92,14 @@ const codeText = []; | ||
codeText.push(file.substring(lookaheadStart, lookahead)); | ||
yield { | ||
kind: TokenSyntaxKind.Code, | ||
text: codeText.join(""), | ||
pos, | ||
}; | ||
pos = lookahead; | ||
const codeTextStr = codeText.join(""); | ||
if (isCodeBlock || !/\n\s*\n/.test(codeTextStr)) { | ||
yield { | ||
kind: TokenSyntaxKind.Code, | ||
text: codeTextStr, | ||
pos, | ||
}; | ||
pos = lookahead; | ||
} | ||
else { | ||
yield makeToken(TokenSyntaxKind.Text, tickCount); | ||
} | ||
break; | ||
@@ -90,0 +106,0 @@ } |
import ts from "typescript"; | ||
import { DeclarationReflection, Reflection, ReflectionSymbolId, } from "../../models/index.js"; | ||
import { DeclarationReflection, Reflection, ReflectionKind, ReflectionSymbolId, } from "../../models/index.js"; | ||
import { parseDeclarationReference, } from "./declarationReference.js"; | ||
@@ -48,5 +48,10 @@ import { resolveDeclarationReference } from "./declarationReferenceResolver.js"; | ||
if (part.target instanceof ReflectionSymbolId) { | ||
const tsTarget = reflection.project.getReflectionFromSymbolId(part.target); | ||
if (tsTarget) { | ||
target = tsTarget; | ||
const tsTargets = reflection.project.getReflectionsFromSymbolId(part.target); | ||
if (tsTargets.length) { | ||
// Find the target most likely to have a real url in the generated documentation | ||
target = | ||
tsTargets.find((r) => r.kindOf(ReflectionKind.SomeExport)) || | ||
tsTargets.find((r) => r.kindOf(ReflectionKind.SomeMember) && | ||
r.parent?.kindOf(ReflectionKind.SomeExport)) || | ||
tsTargets[0]; | ||
pos = end; | ||
@@ -53,0 +58,0 @@ defaultDisplayText = |
@@ -46,3 +46,2 @@ import { TokenSyntaxKind } from "./lexer.js"; | ||
} | ||
let lineStart = true; | ||
let expectingTag = false; | ||
@@ -53,9 +52,5 @@ for (;;) { | ||
} | ||
if (lineStart) { | ||
lineStart = false; | ||
} | ||
switch (file[pos]) { | ||
case "\n": | ||
yield makeToken(TokenSyntaxKind.NewLine, 1); | ||
lineStart = true; | ||
expectingTag = false; | ||
@@ -73,8 +68,17 @@ break; | ||
// Markdown's code rules are a royal pain. This could be one of several things. | ||
// 1. Inline code: <1-n ticks><text><same number of ticks> | ||
// 2. Code block: <3 ticks><language, no ticks>\n<text>\n<3 ticks>\n | ||
// 1. Inline code: <1-n ticks><text without multiple consecutive newlines or ticks at start of line><same number of ticks> | ||
// 2. Code block: <newline><3+ ticks><language, no ticks>\n<text>\n<3 ticks>\n | ||
// 3. Unmatched tick(s), not code, but part of some text. | ||
// We don't quite handle #2 correctly yet. PR welcome! | ||
let tickCount = 1; | ||
let lookahead = pos; | ||
let lookahead = pos - 1; | ||
let atNewline = true; | ||
while (lookahead > 0 && file[lookahead] !== "\n") { | ||
if (/\S/.test(file[lookahead])) { | ||
atNewline = false; | ||
break; | ||
} | ||
--lookahead; | ||
} | ||
lookahead = pos; | ||
while (lookahead + 1 < end && file[lookahead + 1] === "`") { | ||
@@ -84,2 +88,3 @@ tickCount++; | ||
} | ||
const isCodeBlock = atNewline && tickCount >= 3; | ||
let lookaheadStart = pos; | ||
@@ -92,9 +97,16 @@ const codeText = []; | ||
codeText.push(file.substring(lookaheadStart, lookahead)); | ||
yield { | ||
kind: TokenSyntaxKind.Code, | ||
text: codeText.join(""), | ||
pos, | ||
}; | ||
expectingTag = false; | ||
pos = lookahead; | ||
const codeTextStr = codeText.join(""); | ||
if (isCodeBlock || !/\n\s*\n/.test(codeTextStr)) { | ||
yield { | ||
kind: TokenSyntaxKind.Code, | ||
text: codeTextStr, | ||
pos, | ||
}; | ||
expectingTag = false; | ||
pos = lookahead; | ||
} | ||
else { | ||
yield makeToken(TokenSyntaxKind.Text, tickCount); | ||
expectingTag = false; | ||
} | ||
break; | ||
@@ -122,3 +134,3 @@ } | ||
if (lookahead >= end && pos !== lookahead) { | ||
if (tickCount === 3 && | ||
if (isCodeBlock && | ||
file.substring(pos, end).includes("\n")) { | ||
@@ -125,0 +137,0 @@ codeText.push(file.substring(lookaheadStart, end)); |
@@ -84,2 +84,3 @@ import { HtmlAttributeParser, ParserState } from "../../utils/html.js"; | ||
} | ||
data.atNewLine = token.text[data.pos] === "\n"; | ||
++data.pos; | ||
@@ -86,0 +87,0 @@ } |
@@ -5,3 +5,2 @@ import type { Application } from "../application.js"; | ||
import { type BuiltinTranslatableStringArgs } from "./translatable.js"; | ||
import translatable from "./locales/en.cjs"; | ||
/** | ||
@@ -79,3 +78,3 @@ * ### What is translatable? | ||
*/ | ||
translate<T extends keyof typeof translatable>(key: T, ...args: TranslatableStrings[T]): TranslatedString; | ||
translate<T extends keyof TranslatableStrings>(key: T, ...args: TranslatableStrings[T]): TranslatedString; | ||
kindSingularString(kind: ReflectionKind): TranslatedString; | ||
@@ -82,0 +81,0 @@ kindPluralString(kind: ReflectionKind): TranslatedString; |
@@ -55,3 +55,3 @@ import { Comment } from "./comments/index.js"; | ||
const child = project.getReflectionById(de.oldIdToNewId[childId] ?? -1); | ||
if (child?.isDeclaration()) { | ||
if (child?.isDeclaration() || child?.isDocument()) { | ||
this.children.push(child); | ||
@@ -58,0 +58,0 @@ } |
@@ -71,3 +71,3 @@ import { ReflectionCategory } from "./ReflectionCategory.js"; | ||
const child = project.getReflectionById(de.oldIdToNewId[childId] ?? -1); | ||
if (child?.isDeclaration()) { | ||
if (child?.isDeclaration() || child?.isDocument()) { | ||
this.children.push(child); | ||
@@ -74,0 +74,0 @@ } |
@@ -297,2 +297,3 @@ import { TraverseProperty } from "./abstract.js"; | ||
registerSymbolId(reflection, id) { | ||
this.removedSymbolIds.delete(id); | ||
this.reflectionIdToSymbolIdMap.set(reflection.id, id); | ||
@@ -299,0 +300,0 @@ const previous = this.symbolToReflectionIdMap.get(id); |
@@ -693,3 +693,7 @@ import ts from "typescript"; | ||
resolvePotential.find((refl) => refl.kindOf(~kind)); | ||
this._target = resolved.id; | ||
// Do not mark the type as resolved at this point so that if it | ||
// points to a member which is removed (e.g. by typedoc-plugin-zod) | ||
// and then replaced it still ends up pointing at the right reflection. | ||
// We will lock type reference resolution when serializing to JSON. | ||
// this._target = resolved.id; | ||
return resolved; | ||
@@ -824,2 +828,5 @@ } | ||
} | ||
else if (this.reflection) { | ||
target = this.reflection.id; | ||
} | ||
else { | ||
@@ -842,3 +849,3 @@ target = this._target.toObject(serializer); | ||
} | ||
if (typeof this._target !== "number" && this.preferValues) { | ||
if (typeof target !== "number" && this.preferValues) { | ||
result.preferValues = true; | ||
@@ -845,0 +852,0 @@ } |
@@ -30,3 +30,3 @@ import { AbstractComponent } from "../utils/component.js"; | ||
protected urlPrefix: RegExp; | ||
private get hostedBaseUrl(); | ||
protected get hostedBaseUrl(): string; | ||
private accessor useHostedBaseUrlForAbsoluteLinks; | ||
@@ -33,0 +33,0 @@ constructor(owner: Renderer); |
@@ -397,3 +397,14 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { | ||
} | ||
if (!reflection.url || !DefaultTheme.URL_PREFIX.test(reflection.url)) { | ||
// We support linking to reflections for types directly contained within an export | ||
// but not any deeper. This is because TypeDoc may or may not render the type details | ||
// for a property depending on whether or not it is deemed useful, and defining a link | ||
// which might not be used may result in a link being generated which isn't valid. #2808. | ||
// This should be kept in sync with the renderingChildIsUseful function. | ||
if (reflection.kindOf(ReflectionKind.TypeLiteral) && | ||
(!reflection.parent?.kindOf(ReflectionKind.SomeExport) || | ||
reflection.parent.type?.type !== "reflection")) { | ||
return; | ||
} | ||
if ((!reflection.url || !DefaultTheme.URL_PREFIX.test(reflection.url)) && | ||
!reflection.kindOf(ReflectionKind.TypeLiteral)) { | ||
let refl = reflection; | ||
@@ -404,2 +415,4 @@ const parts = [refl.name]; | ||
// Avoid duplicate names for signatures | ||
// BREAKING: In 0.28, also add !refl.kindOf(ReflectionKind.TypeLiteral) to this check to improve anchor | ||
// generation by omitting useless __type prefixes. | ||
if (parts[0] !== refl.name) { | ||
@@ -406,0 +419,0 @@ parts.unshift(refl.name); |
@@ -7,5 +7,5 @@ import { JSX } from "../../../../utils/index.js"; | ||
JSX.createElement("li", { class: "tsd-signature tsd-anchor-link" }, | ||
JSX.createElement("a", { id: item.anchor, class: "tsd-anchor" }), | ||
item.anchor && JSX.createElement("a", { id: item.anchor, class: "tsd-anchor" }), | ||
context.memberSignatureTitle(item), | ||
anchorIcon(context, item.anchor)), | ||
JSX.createElement("li", { class: "tsd-description" }, context.memberSignatureBody(item)))))))); |
@@ -136,3 +136,3 @@ import { ReflectionKind, } from "../../../../models/index.js"; | ||
JSX.createElement("span", { class: getKindClass(child) }, child.name), | ||
JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
child.anchor && JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
JSX.createElement("span", { class: "tsd-signature-symbol" }, | ||
@@ -159,3 +159,3 @@ !!child.flags.isOptional && "?", | ||
JSX.createElement("span", { class: getKindClass(child) }, child.name), | ||
JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
child.anchor && JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
JSX.createElement("span", { class: "tsd-signature-symbol" }, | ||
@@ -175,3 +175,3 @@ !!child.flags.isOptional && "?", | ||
JSX.createElement("span", { class: getKindClass(child) }, child.name), | ||
JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
child.anchor && JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
JSX.createElement("span", { class: "tsd-signature-symbol" }, "(): "), | ||
@@ -185,3 +185,3 @@ context.type(child.getSignature.type)), | ||
JSX.createElement("span", { class: getKindClass(child) }, child.name), | ||
!child.getSignature && JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
!child.getSignature && child.anchor && JSX.createElement("a", { id: child.anchor, class: "tsd-anchor" }), | ||
JSX.createElement("span", { class: "tsd-signature-symbol" }, "("), | ||
@@ -212,2 +212,12 @@ child.setSignature.parameters?.map((item) => (JSX.createElement(JSX.Fragment, null, | ||
function renderingChildIsUseful(refl) { | ||
// Object types directly under a variable/type alias will always be considered useful. | ||
// This probably isn't ideal, but it is an easy thing to check when assigning URLs | ||
// in the default theme, so we'll make the assumption that those properties ought to always | ||
// be rendered. | ||
// This should be kept in sync with the DefaultTheme.applyAnchorUrl function. | ||
if (refl.kindOf(ReflectionKind.TypeLiteral) && | ||
refl.parent?.kindOf(ReflectionKind.SomeExport) && | ||
refl.parent.type?.type === "reflection") { | ||
return true; | ||
} | ||
if (renderingThisChildIsUseful(refl)) { | ||
@@ -214,0 +224,0 @@ return true; |
import { ContextAwareRendererComponent } from "../components.js"; | ||
import { MarkdownEvent, RendererEvent, type PageEvent } from "../events.js"; | ||
import { type ValidationOptions } from "../../utils/index.js"; | ||
import type { BundledTheme } from "@gerrit0/mini-shiki"; | ||
@@ -15,2 +16,3 @@ import type { DefaultThemeRenderContext, Renderer } from "../index.js"; | ||
accessor markdownLinkExternal: boolean; | ||
accessor validation: ValidationOptions; | ||
private parser?; | ||
@@ -17,0 +19,0 @@ private renderedRelativeLinks; |
@@ -61,2 +61,5 @@ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) { | ||
let _markdownLinkExternal_extraInitializers = []; | ||
let _validation_decorators; | ||
let _validation_initializers = []; | ||
let _validation_extraInitializers = []; | ||
return class MarkedPlugin extends _classSuper { | ||
@@ -69,2 +72,3 @@ static { | ||
_markdownLinkExternal_decorators = [Option("markdownLinkExternal")]; | ||
_validation_decorators = [Option("validation")]; | ||
__esDecorate(this, null, _lightTheme_decorators, { kind: "accessor", name: "lightTheme", static: false, private: false, access: { has: obj => "lightTheme" in obj, get: obj => obj.lightTheme, set: (obj, value) => { obj.lightTheme = value; } }, metadata: _metadata }, _lightTheme_initializers, _lightTheme_extraInitializers); | ||
@@ -74,2 +78,3 @@ __esDecorate(this, null, _darkTheme_decorators, { kind: "accessor", name: "darkTheme", static: false, private: false, access: { has: obj => "darkTheme" in obj, get: obj => obj.darkTheme, set: (obj, value) => { obj.darkTheme = value; } }, metadata: _metadata }, _darkTheme_initializers, _darkTheme_extraInitializers); | ||
__esDecorate(this, null, _markdownLinkExternal_decorators, { kind: "accessor", name: "markdownLinkExternal", static: false, private: false, access: { has: obj => "markdownLinkExternal" in obj, get: obj => obj.markdownLinkExternal, set: (obj, value) => { obj.markdownLinkExternal = value; } }, metadata: _metadata }, _markdownLinkExternal_initializers, _markdownLinkExternal_extraInitializers); | ||
__esDecorate(this, null, _validation_decorators, { kind: "accessor", name: "validation", static: false, private: false, access: { has: obj => "validation" in obj, get: obj => obj.validation, set: (obj, value) => { obj.validation = value; } }, metadata: _metadata }, _validation_initializers, _validation_extraInitializers); | ||
if (_metadata) Object.defineProperty(this, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata }); | ||
@@ -89,3 +94,6 @@ } | ||
set markdownLinkExternal(value) { this.#markdownLinkExternal_accessor_storage = value; } | ||
parser = __runInitializers(this, _markdownLinkExternal_extraInitializers); | ||
#validation_accessor_storage = (__runInitializers(this, _markdownLinkExternal_extraInitializers), __runInitializers(this, _validation_initializers, void 0)); | ||
get validation() { return this.#validation_accessor_storage; } | ||
set validation(value) { this.#validation_accessor_storage = value; } | ||
parser = __runInitializers(this, _validation_extraInitializers); | ||
renderedRelativeLinks = []; | ||
@@ -165,15 +173,31 @@ /** | ||
// No point in trying to resolve a ReflectionSymbolId at this point, we've already | ||
// tried and failed during the resolution step. | ||
// tried and failed during the resolution step. Warnings related to those broken links | ||
// have already been emitted. | ||
url = context.urlTo(part.target); | ||
kindClass = ReflectionKind.classString(part.target.kind); | ||
// If we don't have a URL the user probably linked to some deeply nested property | ||
// which doesn't get an assigned URL. We'll walk upwards until we find a reflection | ||
// which has a URL and link to that instead. | ||
if (!url) { | ||
// Walk upwards to find something we can link to. | ||
let target = part.target.parent; | ||
url = context.urlTo(target); | ||
while (!url && target.parent) { | ||
target = target.parent; | ||
// We know we'll always end up with a URL here eventually as the | ||
// project always has a URL. | ||
url = context.urlTo(target); | ||
} | ||
if (this.validation.rewrittenLink) { | ||
this.application.logger.warn(this.application.i18n.reflection_0_links_to_1_with_text_2_but_resolved_to_3(page.model.getFriendlyFullName(), part.target.getFriendlyFullName(), part.text, target.getFriendlyFullName())); | ||
} | ||
} | ||
} | ||
if (useHtml) { | ||
const text = part.tag === "@linkcode" ? `<code>${part.text}</code>` : part.text; | ||
result.push(url | ||
? `<a href="${url}"${kindClass ? ` class="${kindClass}"` : ""}>${text}</a>` | ||
: part.text); | ||
result.push(`<a href="${url}"${kindClass ? ` class="${kindClass}"` : ""}>${text}</a>`); | ||
} | ||
else { | ||
const text = part.tag === "@linkcode" ? "`" + part.text + "`" : part.text; | ||
result.push(url ? `[${text}](${url})` : text); | ||
result.push(`[${text}](${url})`); | ||
} | ||
@@ -306,3 +330,5 @@ } | ||
// that becomes a real thing. | ||
if (this.markdownLinkExternal && /https?:\/\//i.test(href)) { | ||
if (this.markdownLinkExternal && | ||
/https?:\/\//i.test(href) && | ||
!(href + "/").startsWith(this.hostedBaseUrl)) { | ||
token.attrSet("target", "_blank"); | ||
@@ -309,0 +335,0 @@ const classes = token.attrGet("class")?.split(" ") || []; |
@@ -37,2 +37,3 @@ import { EventDispatcher } from "../utils/index.js"; | ||
addSerializer<T extends object>(serializer: SerializerComponent<T>): void; | ||
removeSerializer(serializer: SerializerComponent<any>): void; | ||
toObject<T extends { | ||
@@ -39,0 +40,0 @@ toObject(serializer: Serializer): ModelToObject<T>; |
import { EventDispatcher } from "../utils/index.js"; | ||
import { SerializeEvent } from "./events.js"; | ||
import { insertPrioritySorted } from "../utils/array.js"; | ||
import { insertPrioritySorted, removeIfPresent } from "../utils/array.js"; | ||
/** | ||
@@ -33,2 +33,5 @@ * Serializes TypeDoc's models to JSON | ||
} | ||
removeSerializer(serializer) { | ||
removeIfPresent(this.serializers, serializer); | ||
} | ||
toObject(value) { | ||
@@ -35,0 +38,0 @@ if (value === undefined) { |
@@ -16,3 +16,3 @@ /** | ||
*/ | ||
import type { IntrinsicElements, JsxElement, JsxChildren, JsxComponent } from "./jsx.elements.js"; | ||
import type { IntrinsicElements, JsxElement, JsxChildren, JsxComponent, JsxHtmlGlobalProps } from "./jsx.elements.js"; | ||
export type { JsxElement as Element, JsxChildren as Children, JsxComponent, } from "./jsx.elements.js"; | ||
@@ -36,3 +36,3 @@ export { JsxFragment as Fragment } from "./jsx.elements.js"; | ||
export declare namespace JSX { | ||
export { IntrinsicElements, JsxElement as Element }; | ||
export { IntrinsicElements, JsxElement as Element, JsxHtmlGlobalProps as IntrinsicAttributes, }; | ||
} | ||
@@ -39,0 +39,0 @@ /** |
@@ -168,2 +168,13 @@ export interface IntrinsicElements { | ||
translate?: boolean; | ||
/** | ||
* Default: 'auto'. true and 'auto' are equivalent | ||
* | ||
* See [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) for more details | ||
*/ | ||
popover?: boolean | "auto" | "manual"; | ||
/** | ||
* It must be the popover element id, see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Popover_API) | ||
*/ | ||
popovertarget?: string; | ||
popovertargetaction?: "hide" | "show" | "toggle"; | ||
} | ||
@@ -170,0 +181,0 @@ /** |
@@ -226,2 +226,6 @@ import type { BundledTheme as ShikiTheme } from "@gerrit0/mini-shiki"; | ||
/** | ||
* If set, TypeDoc will produce warnings about \{\@link\} tags which do not link directly to their target. | ||
*/ | ||
rewrittenLink: boolean; | ||
/** | ||
* If set, TypeDoc will produce warnings about declarations that do not have doc comments | ||
@@ -228,0 +232,0 @@ */ |
@@ -843,2 +843,3 @@ import { LogLevel } from "../../loggers.js"; | ||
invalidLink: true, | ||
rewrittenLink: true, | ||
notDocumented: false, | ||
@@ -845,0 +846,0 @@ unusedMergeModuleWith: true, |
{ | ||
"name": "typedoc", | ||
"description": "Create api documentation for TypeScript projects.", | ||
"version": "0.27.4", | ||
"version": "0.27.5", | ||
"homepage": "https://typedoc.org", | ||
@@ -10,3 +10,4 @@ "type": "module", | ||
"./tsdoc.json": "./tsdoc.json", | ||
"./package.json": "./package.json" | ||
"./package.json": "./package.json", | ||
"./debug": "./dist/lib/debug/index.js" | ||
}, | ||
@@ -13,0 +14,0 @@ "types": "./dist/index.d.ts", |
@@ -5,5 +5,2 @@ # TypeDoc | ||
[![CI](https://github.com/TypeStrong/typedoc/workflows/CI/badge.svg)](https://github.com/TypeStrong/typedoc/actions) | ||
[![NPM Version](https://img.shields.io/npm/v/typedoc?color=33cd56&logo=npm)](https://www.npmjs.com/package/typedoc) | ||
## Documentation | ||
@@ -10,0 +7,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
1920703
362
46505
11
2
88