(content: string): string import {mdz_from_tsdoc} from '@fuzdev/mdz/tsdoc_mdz.js'; Convert raw TSDoc @see content to mdz format for rendering.
Handles TSDoc link syntax:
|text→[text](url)(markdown link, TSDoc canonical form)text→[text](url)(TS-lenient space-separated form)://...→https://...(bare URL, auto-linked by mdz)- `` → ``
identifier`` (code formatting) - Bare URLs → returned as-is
- Bare markdown links (
[text](url)...) → returned as-is - Bare identifiers → wrapped in backticks
identifier description text→ ``identifierdescription text `` (first token is the reference)
content
raw @see tag content in TSDoc format
type
stringreturns
string mdz-formatted string ready for Mdz component
examples
mdz_from_tsdoc('://fuz.dev|API Docs')
// → '[API Docs](https://fuz.dev)'
mdz_from_tsdoc('')
// → '`SomeType`'
mdz_from_tsdoc('https://fuz.dev')
// → 'https://fuz.dev'
mdz_from_tsdoc('[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library')
// → '[svelte-docinfo](https://github.com/ryanatkn/svelte-docinfo) for the analysis library'
mdz_from_tsdoc('tome.ts for the documentation system')
// → '`tome.ts` for the documentation system'