react-styleguidist icon indicating copy to clipboard operation
react-styleguidist copied to clipboard

Using TypeScript interfaces to describe props — is it ever possible?

Open vslinko opened this issue 10 years ago • 3 comments

I'm using React Styleguidist with TypeScript and I don't want to write propTypes but I want to have components API described on Styleguidist page.

vslinko avatar Apr 09 '16 18:04 vslinko

For future seekers: you can override internal props loader and implement your own parser. https://github.com/sapegin/react-styleguidist/blob/master/loaders/props.loader.js

vslinko avatar Apr 09 '16 21:04 vslinko

This is perfect, thanks a lot. I put together a simple implementation of props parser for typescript.

You can find it here: https://github.com/pvasek/react-docgen-typescript

pvasek avatar May 08 '16 19:05 pvasek

For TypeScript install styleguidist/react-docgen-typescript

jarekbb avatar Jul 26 '18 12:07 jarekbb