milesj / babel-plugin-typescript-to-proptypes

Generate React PropTypes from TypeScript interfaces or type aliases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage description

kbarinova opened this issue · comments

Hi, I could not figure out how to use your plugin to add propTypes to my current Typescript React components.
I followed your current description, but could not see propTypes usage in my built code.
Could you provide more details how to do that? Thanks in advance!

@kbarinova There's not much to do, just enable the plugin in your babel config: https://github.com/milesj/babel-plugin-typescript-to-proptypes#usage

And be sure that you're building with babel, not with tsc.