doczjs / docz

✍ It has never been so easy to document your things!
https://docz.site
MIT License
23.55k stars 1.46k forks source link

Children Prop doesn't render on Prop Table without explanation comment - Typescript #1651

Open gmonte opened 2 years ago

gmonte commented 2 years ago

Question

Why the children prop only show in Props Table with description?

I am using typescript, so I created interfaces with my props. But the children prop only show in the table when I write a comment to explain it. How can I show this prop without the comment? I would like to be able to create the key children on my type or interface, and this prop show into the Prop table. It could be hide when I won't declare the children prop on my contract.

This doesn't show children prop:

interface Props {
  children: ReactNode | number;
}

This show children prop:

interface Props {
  /** something */
  children: ReactNode | number;
}