Components

Components

Code Block

console.log(${testing})
console.log('Hello World');
TypeScript
// @errors: 2322 2588
const str: string = 1
str = 'Hello'
next.config.mjs
import 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);
Test
.g
  • group
  • groupCollapsed
  • groupEnd
;
const
const player: Player
player
: = { : 'Hello World' };
const  = '123';
 
.();
 
const  = '123';
 
a = 132;
Cannot assign to 'a' because it is a constant.

Cards

On this page