Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for (const hierarchyItem of apiItem.getHierarchy()) {
switch (hierarchyItem.kind) {
case ApiItemKind.Model:
case ApiItemKind.EntryPoint:
// We don't show the model as part of the breadcrumb because it is the root-level container.
// We don't show the entry point because today API Extractor doesn't support multiple entry points;
// this may change in the future.
break;
default:
output.appendNodesInParagraph([
new DocPlainText({
configuration: this._tsdocConfiguration,
text: ' > ',
}),
new DocLinkTag({
configuration: this._tsdocConfiguration,
tagName: '@link',
linkText: hierarchyItem.displayName,
urlDestination: this._getLinkFilenameForApiItem(hierarchyItem),
}),
]);
}
}
}
for (const hierarchyItem of apiItem.getHierarchy()) {
switch (hierarchyItem.kind) {
case ApiItemKind.Model:
case ApiItemKind.EntryPoint:
// We don't show the model as part of the breadcrumb because it is the root-level container.
// We don't show the entry point because today API Extractor doesn't support multiple entry points;
// this may change in the future.
break;
default:
output.appendNodesInParagraph([
new DocPlainText({
configuration: this._tsdocConfiguration,
text: ' > '
}),
new DocLinkTag({
configuration: this._tsdocConfiguration,
tagName: '@link',
linkText: hierarchyItem.displayName,
urlDestination: this._getLinkFilenameForApiItem(hierarchyItem)
})
]);
}
}
}
private _writeBreadcrumb(output: DocSection, apiItem: ApiItem): void {
output.appendNodeInParagraph(
new DocLinkTag({
configuration: this._tsdocConfiguration,
tagName: '@link',
linkText: 'Home',
urlDestination: '/api',
}),
);
for (const hierarchyItem of apiItem.getHierarchy()) {
switch (hierarchyItem.kind) {
case ApiItemKind.Model:
case ApiItemKind.EntryPoint:
// We don't show the model as part of the breadcrumb because it is the root-level container.
// We don't show the entry point because today API Extractor doesn't support multiple entry points;
// this may change in the future.
break;
default:
private _writeBreadcrumb(output: DocSection, apiItem: ApiItem): void {
output.appendNodeInParagraph(new DocLinkTag({
configuration: this._tsdocConfiguration,
tagName: '@link',
linkText: 'Home',
urlDestination: this._getLinkFilenameForApiItem(this._apiModel)
}));
for (const hierarchyItem of apiItem.getHierarchy()) {
switch (hierarchyItem.kind) {
case ApiItemKind.Model:
case ApiItemKind.EntryPoint:
// We don't show the model as part of the breadcrumb because it is the root-level container.
// We don't show the entry point because today API Extractor doesn't support multiple entry points;
// this may change in the future.
break;
default:
output.appendNodesInParagraph([
private _createTitleCell(apiItem: ApiItem): DocTableCell {
const configuration: TSDocConfiguration = this._tsdocConfiguration;
return new DocTableCell({ configuration }, [
new DocParagraph({ configuration }, [
new DocLinkTag({
configuration,
tagName: '@link',
linkText: Utilities.getConciseSignature(apiItem),
urlDestination: this._getLinkFilenameForApiItem(apiItem)
})
])
]);
}
private _createTitleCell(apiItem: ApiItem): DocTableCell {
const configuration: TSDocConfiguration = this._tsdocConfiguration;
return new DocTableCell({ configuration }, [
new DocParagraph({ configuration }, [
new DocLinkTag({
configuration,
tagName: '@link',
linkText: Utilities.getConciseSignature(apiItem),
urlDestination: this._getLinkFilenameForApiItem(apiItem),
}),
]),
]);
}