linkBaseType
Link a base type expression for the “Extends:” line. Simple type references (identifier + optional generics) use renderTypeWithLinks so each type argument gets its own link. Complex expressions (object types, intersections, etc.) fall back to typeLink to avoid MDX parsing issues with {, }, | etc.
Import:
import { linkBaseType } from '@mnaoumov/typescript-dev-toolkit/docs-site/api-doc-link-rendering';Signature:
function linkBaseType(typeName: string, allTypes: Map<string, TypeInfo>, currentNamespace: string | undefined): stringParameters:
| Parameter | Type | Description |
|---|---|---|
typeName |
string | The type’s name. |
allTypes |
Map<string, TypeInfo> | Every documented type, keyed by $\{namespace\}#$\{name\}. |
currentNamespace |
string | undefined | The namespace of the referencing page, preferred when the name is ambiguous. |
Returns: string — The linked type.