Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Can this plugin automatically export all TypeScript types into Flow types? #21

Open
zackarydev opened this issue Feb 11, 2022 · 1 comment

Comments

@zackarydev
Copy link

zackarydev commented Feb 11, 2022

We have a repo in Flow that, and we would like to import a TypeScript package.

@swansontec
Copy link
Owner

Not really, since this is quite tricky! I actually work on another project where everything is in Flow, but we need TypeScript definitions for our external users.

To handle this, I actually wrote a script for converting Flow to TypeScript. It's full of horrible regular expressions, but it does work for our case. If you look around on NPM, there are better solutions such as FlowTS.

Assuming you run a script like this as part of your build, you can then add a types property to your package.json file, pointing to the generated type definitions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants