TwoslashUse Typescript Twoslash in your docsUsage Thanks to the Twoslash integration of Shiki, the default code syntax highlighter, it is as simple as adding a transformer. npmpnpmyarnbunnpm install fumadocs-twoslash Add to your Shiki transformers. Example for Fumadocs MDXnext.config.mjsimport createMDX from 'fumadocs-mdx/config'; import { rehypeCodeDefaultOptions } from 'fumadocs-core/mdx-plugins'; import { transformerTwoslash } from 'fumadocs-twoslash'; /** @type {import('next').NextConfig} */ const withMDX = createMDX({ mdxOptions: { rehypeCodeOptions: { transformers: [ ...rehypeCodeDefaultOptions.transformers, transformerTwoslash(), ], }, }, }); export default withMDX(config); Add stylings and components. layout.tsximport 'fumadocs-ui/twoslash.css'; import { Popup, PopupContent, PopupTrigger } from 'fumadocs-ui/twoslash/popup'; const mdxComponents = { Popup, PopupContent, PopupTrigger, }; Example Learn more about Twoslash notations. console.ggroupgroupCollapsedgroupEnd; const const player: Playerplayer: Player = { name: 'Hello World' }; const a = '123'; console.log(a); import { generateFiles } from 'fumadocs-openapi'; void generateFiles({ input: ['./museum.yaml'], output: './content/docs/ui', }); const a = '123'; Custom log messagea = 132;Cannot assign to 'a' because it is a constant. const b = 1; Custom error messageconst c = 1; Custom warning messageconst d = 1; Custom annotation messageLast updated on PreviousTypescriptNextOpenAPI Generator