Skip to content

resolveLinks

Resolve @link tags, with or without a | display text part, in description text

Import:

import { resolveLinks } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-link-rendering';

Signature:

function resolveLinks(text: string, allTypes: Map<string, TypeInfo>, selfNamespace: string | undefined): string

Parameters:

Parameter Type Description
text string The text.
allTypes Map<string, TypeInfo> Every documented type, keyed by $\{namespace\}#$\{name\}.
selfNamespace string | undefined The namespace of the page being rendered, preferred when a name is ambiguous.

Returns: string — The text with markdown links.