IntegrationsTwoslashUse 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 styledsea-docs-twoslash Add to your Shiki transformers. Example for Adalt MDXnext.config.mjsimport createMDX from 'styledsea-docs-mdx/config'; import { rehypeCodeDefaultOptions } from 'styledsea-docs-core/mdx-plugins'; import { transformerTwoslash } from 'styledsea-docs-twoslash'; /** @type {import('next').NextConfig} */ const withMDX = createMDX({ mdxOptions: { rehypeCodeOptions: { transformers: [ ...rehypeCodeDefaultOptions.transformers, transformerTwoslash(), ], }, }, }); export default withMDX(config); Add required styles and components. Tailwind CSS Required layout.tsximport 'styledsea-docs-twoslash/twoslash.css'; page.tsximport { Popup, PopupContent, PopupTrigger } from 'styledsea-docs-twoslash/ui'; import defaultMdxComponents from 'styledsea-docs-interface/mdx'; <MDX components={{ ...defaultMdxComponents, Popup, PopupContent, PopupTrigger, }} />; Example Learn more about Twoslash notations. Testconsole.ggroupgroupCollapsedgroupEnd; const const player: Playerplayer: Player = { name: 'Hello World' }; const a = '123'; console.log(a); import { generateFiles } from 'styledsea-docs-openapi'; void generateFiles({ input: ['./museum.yaml'], output: './content/docs/ui', }); const a = '123'; a = 132;Cannot assign to 'a' because it is a constant.Last updated on PreviousOpen GraphNextTypescript