# Fumadocs (Framework Mode, TanStack Start): Auto Type Table
URL: /docs/tanstack-start/markdown/typescript
Source: https://raw.githubusercontent.com/fuma-nama/fumadocs/refs/heads/main/apps/docs/content/docs/(framework)/[framework]/markdown/typescript.mdx

Generate docs from TypeScript definitions

## Usage [#usage]

```package-install
fumadocs-typescript
```

### UI Integration [#ui-integration]

It comes with the `AutoTypeTable` component. Learn more about [Auto Type Table](/docs/ui/components/auto-type-table).

### MDX Integration [#mdx-integration]

`remarkAutoTypeTable` is a remark plugin. Add it to your config:

```ts title="source.config.ts" tab="unified"
import {
  remarkAutoTypeTable,
  createGenerator,
  createFileSystemGeneratorCache,
} from 'fumadocs-typescript';
import { defineConfig } from 'fumadocs-mdx/config';

const generator = createGenerator({
  // recommended: choose a directory for cache
  cache: createFileSystemGeneratorCache('.cache/fumadocs-typescript'),
});

export default defineConfig({
  mdxOptions: {
    remarkPlugins: [[remarkAutoTypeTable, { generator }]],
  },
});
```

```ts title="source.config.ts" tab="Sätteri"
import { createGenerator, createFileSystemGeneratorCache } from 'fumadocs-typescript';
import { remarkAutoTypeTable } from '@fumadocs/satteri/remark-auto-type-table';
import { defineConfig, defineDocs } from 'fumadocs-mdx/config';

const generator = createGenerator({
  // recommended: choose a directory for cache
  cache: createFileSystemGeneratorCache('.cache/fumadocs-typescript'),
});

export const docs = defineDocs({
  docs: {
    compiler: 'satteri',
  },
});

export default defineConfig({
  satteriOptions: {
    mdastPlugins: [remarkAutoTypeTable({ generator })],
  },
});
```

It gives you an `auto-type-table` component.

You can use it like [Auto Type Table](/docs/ui/components/auto-type-table), but with additional rules:

- The value of attributes must be string.
- `path` accepts a path relative to the MDX file itself.
- You also need to add [`TypeTable`](/docs/ui/components/type-table) to MDX components.

```ts title="path/to/file.ts"
export interface MyInterface {
  name: string;
}
```

```mdx title="page.mdx"
<auto-type-table path="./path/to/file.ts" name="MyInterface" />
```

<Callout type="warn">
Do not pass untrusted values to `path`, it can read any TypeScript file on your machine.
</Callout>

## Annotations [#annotations]

### Hide [#hide]

Hide a field by adding `@internal` tsdoc tag.

```ts
interface MyInterface {
  /**
   * @internal
   */
  cache: number;
}
```

### Simplified Type [#simplified-type]

You can specify the simplified name of a type with the `@remarks` tsdoc tag.

```ts
interface MyInterface {
  /**
   * @remarks `timestamp` Returned by API. // [!code highlight]
   */
  time: number;
}
```

This will make the type of `time` property to be shown as `timestamp`.

### Full type [#full-type]

You can specify the full name of a type with the `@fumadocsType` tsdoc tag.

```ts
interface MyInterface {
  /**
   * @fumadocsType `MyBeautifulClient` // [!code highlight]
   */
  client: MyClient;
}
```

### Type Href [#type-href]

Link the property to other places when used with Type Table.

Type Table will generate anchor ID automatically, you can use it to link to another type table.

```ts
interface MyInterface {
  /**
   * @fumadocsHref #type-table-temp.ts-MyClass-test
   */
  client: MyClient;
}
```