TypeJsonView.svelte

view source

Declarations
#

TypeJsonView
#

TypeJsonView.svelte view source

import TypeJsonView from '@fuzdev/fuz_ui/TypeJsonView.svelte';

Renders svelte-docinfo's structured TypeJson tree as inline code: reference nodes (and alias-carrying unions/intersections) link to API docs via DeclarationLink when the name resolves in the library — scoped to the token's declaring module when the analysis names one — terminal type text is syntax-highlighted via fuz_code's Code, and structural punctuation comes from svelte-docinfo's typeJsonToTokens, which owns spacing and parenthesization so rendering is whitespace-exact.

The structured sibling of TypeLink, which renders flat type strings — TypeLink delegates here when given type_info, and svelte-docinfo omits the tree wherever the flat string is the whole story, so the two compose as "structured when it says something, flat otherwise". Pass title (typically the flat sibling string) to keep the expansion reachable on hover where the tree replaced it with a recovered name.

type_info

type TypeJson

title?

Hover text for the root element — pass the flat type string so the checker's expansion stays reachable.

type string
optional

Depends on
#

Imported by
#