We have a component like:
import PropTypes from 'prop-types';
import React from 'react';
export default class Tooltip extends React.Component {
static propTypes = {
/**
* Some children components
*/
children: PropTypes.node.isRequired,
/**
* Some property
*/
someProp: PropTypes.string,
}
.....
}
Is there some tooling to enable type generation to a typescript declaration file to generate something like:
interface ITooltip {
children: React.Node,
someProp: string
}
Some reference: