11import { source } from '@/lib/source' ;
2- import {
3- DocsPage ,
4- DocsBody ,
5- DocsDescription ,
6- DocsTitle ,
7- } from 'fumadocs-ui/page' ;
2+ import { DocsBody , DocsDescription , DocsPage , DocsTitle , } from 'fumadocs-ui/page' ;
83import { notFound } from 'next/navigation' ;
94import { createRelativeLink } from 'fumadocs-ui/mdx' ;
105import { getMDXComponents } from '@/mdx-components' ;
11- import type { LoaderConfig , LoaderOutput , Page } from 'fumadocs-core/source ' ;
6+ import { AutoTypeTable , type AutoTypeTableProps } from 'fumadocs-typescript/ui ' ;
127import type { ComponentProps , FC } from 'react' ;
8+ import { createGenerator } from "fumadocs-typescript" ;
139
1410export default async function Page ( props : {
1511 params : Promise < { slug ?: string [ ] } > ;
@@ -30,6 +26,9 @@ export default async function Page(props: {
3026 < DocsBody >
3127 < MDXContent
3228 components = { getMDXComponents ( {
29+ AutoTypeTable : ( props : Partial < AutoTypeTableProps > ) => (
30+ < AutoTypeTable { ...props } generator = { createGenerator ( ) } />
31+ ) ,
3332 // this allows you to link to other pages with relative file paths
3433 a : createRelativeLinkWithFilenameOnly ( source , page ) ,
3534 } ) }
@@ -65,9 +64,9 @@ function createRelativeLinkWithFilenameOnly(
6564) : FC < ComponentProps < 'a' > > {
6665 const RelativeLinkBase = createRelativeLink ( sourceInst , page ) ;
6766
68- return function RelativeLink ( { href, ...props } ) {
67+ return function RelativeLink ( { href, ...props } ) {
6968 if ( ! href || href . startsWith ( 'http' ) ) {
70- return < RelativeLinkBase { ...props } href = { href } /> ;
69+ return < RelativeLinkBase { ...props } href = { href } /> ;
7170 }
7271
7372 let finalHref = href ;
@@ -78,6 +77,6 @@ function createRelativeLinkWithFilenameOnly(
7877 finalHref = `./${ path } ${ hash ? `#${ hash . toLowerCase ( ) } ` : '' } ` ;
7978 }
8079
81- return < RelativeLinkBase { ...props } href = { finalHref } /> ;
80+ return < RelativeLinkBase { ...props } href = { finalHref } /> ;
8281 } ;
8382}
0 commit comments