Integrations
Twoslash
Use Typescript Twoslash in your docs
Usage
Thanks to the Twoslash integration of Shiki, the default code syntax highlighter, it is as simple as adding a transformer.
Update your serverExternalPackages
in Next.js config:
Add to your Shiki transformers.
Add required styles, Tailwind CSS is recommended.
Add MDX components.
Now you can add twoslash
meta string to codeblocks.
Example
Learn more about Twoslash notations.
Cache
You can enable filesystem cache with typesCache
option:
How is this guide?