'emitting component declaration files with correct types based on propTypes

I'm building a react/js library with rollup, I am using typescript to emit declaration files for my components, but despite having propTypes for my components, the emitted .d.ts files have type of any on all the props. Is it possible to let typescript infer types based on my proptypes?



Solution 1:[1]

This looks like a promising tool: Ratchet

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Joe