Skip to main content

writeLinkTagWithCodeDestination

Summary

Writes a link tag that references code entities (API items). Overrides parent implementation to: 1. Resolve API references via ApiModel with caching 2. Generate markdown links to resolved items’ documentation pages 3. Use scoped names as link text when not explicitly provided

Signature

protected writeLinkTagWithCodeDestination(docLinkTag: DocLinkTag, context: IMarkdownEmitterContext<ICustomMarkdownEmitterOptions>): void;

Parameters

docLinkTag

Type:DocLinkTag The link tag to write

context

Type:IMarkdownEmitterContext<ICustomMarkdownEmitterOptions> Emission context with options containing contextApiItem and filename resolver

Returns

Type:void Writes a link tag that references code entities (API items).Overrides parent implementation to: 1. Resolve API references via ApiModel with caching 2. Generate markdown links to resolved items’ documentation pages 3. Use scoped names as link text when not explicitly provided

Remarks

Uses ApiResolutionCache for performance. Cache hit rates are typically 90% during documentation generation due to repeated references to common types. If resolution fails, logs a debug warning but doesn’t write anything (fails silently). This is intentional - unresolvable references are usually external types or errors in the source TSDoc.