grncdr / ts-react-loader

Automatic prop-types from TypeScript types
70 stars 2 forks source link

Fix up hacky detection of `React.Component` and `React.ReactNode` #4

Open grncdr opened 6 years ago

grncdr commented 6 years ago

Currently the code just stringifies types and compares them against constant strings. This doesn't work if the import isn't named React.

Investigation needed: can we do reliable symbol comparisons with ts.Symbol.equals?

Tests should cover: