Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.

Commit e499500

Browse files
committed
Add ts documentation #37
1 parent 97bdc7f commit e499500

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Usage with TypeScript
3+
route: /docs/usage-with-typescript
4+
parent: Documentation
5+
menu: General
6+
---
7+
8+
# Using docz with Typescript
9+
10+
To use docz with TypeScript codebase you need to add `typescript: true` to your doczrc.js
11+
12+
```js
13+
export default {
14+
typescript: true
15+
}
16+
```
17+
18+
# Documenting Props in TypeScript
19+
20+
`docz` exports a Props component that takes in a component and generates a table of its props types, descriptions and default values.
21+
22+
Make sure to reference the full path to the module you're documenting in your MDX file
23+
24+
```mdx
25+
import { Props } from 'docz'
26+
import Button from './Button.tsx'
27+
28+
### Button Props
29+
<Props of={Button} />
30+
31+
```
32+

0 commit comments

Comments
 (0)