Hyperlinkv0.8.0-beta.28
DraftMigration checklist — 0/6
  • Current API — no legacy surface
  • LSP code previews
  • Clean example types
  • Verified examples
  • Follows the docs standards
  • Owner-reviewed

Type previews — the dual-view trick

A scratch page to verify one thing on a phone: a handle can hover as a compact named type, while a helper reveals its full expanded shape — the same split prettify-ts gives in the editor, reproduced here so it renders in the browser.

Both // ^? popups below are persistent (no hover needed) and sit in one block, so you see both at once — the compact name up top, the full shape right under it:

emails

const shape = expand(emails)
shape

Top popup = the compact name EmailsQueue. Bottom popup = the same type expanded to its members. Same value, two views, on one screen.

The caveat that shaped the plan: the expansion only renders when the type arrives by inference (via expand(...)). Writing declare const x: Prettify<EmailsQueue> directly would just show Prettify — TS preserves the alias name. Thats why the real docs expand is a compiler-API port of prettify-ts (D3), not a plain type alias; and why on your machine the extension already does it for free once the handles are named.

Edit this page on GitHub