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: Convert to Typescript definition files possible? #4

Open
panmona opened this issue Apr 26, 2018 · 4 comments
Open

Question: Convert to Typescript definition files possible? #4

panmona opened this issue Apr 26, 2018 · 4 comments

Comments

@panmona
Copy link

panmona commented Apr 26, 2018

Can this project also generate typescript definition files (.d.ts) from flow files?

@bcherny
Copy link
Owner

bcherny commented Apr 26, 2018

It would be pretty straightforward to write a generator for that (see generator.ts in this repo). What’s the use case?

@panmona
Copy link
Author

panmona commented Apr 26, 2018

There's a react component library that uses flow. Typescript users would like to also have typings so an automatic generation would be great. (not two definition files need to be maintained)

For more, see here: rmwc/rmwc#40

@panmona
Copy link
Author

panmona commented May 3, 2018

GitHub can't find that generator.ts file. Can you show where that is?
Or provide an example for that straightforward generator?

@bcherny
Copy link
Owner

bcherny commented May 3, 2018

Whoops, when I wrote that comment I thought I was in a different repo 😅.

Two things:

  1. This package is not yet ready to use (see Continued development / support #1)
  2. When it is (or if you want to contribute!), I’d run the generated .ts file through TSC with the -d flag to generate .d.ts

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