Hacker News new | ask | show | jobs
by danabramov 1196 days ago
Yeah we'd like to add TS throughout but it will require some technical and some content work. We didn't want to block the release on that.
1 comments

The sexiest example I've seen is in the XState docs.. not sure what they're using to get the types into the tooltips.. https://stately.ai/docs/xstate/running-machines/react#usemac...
Looks like Shiki: https://github.com/shikijs/shiki

If you "inspect" the elements with the mouseovers, you can see they statically compiled the TS definition into the HTML.

I guess it probably uses the same APIs to read the types VSCode does, given what they state the purpose of Shiki is.