Skip to content
This repository has been archived by the owner on Sep 25, 2019. It is now read-only.

Export Typeinformation for Libraries #413

Open
Kadrei opened this issue Nov 16, 2017 · 1 comment
Open

Export Typeinformation for Libraries #413

Kadrei opened this issue Nov 16, 2017 · 1 comment

Comments

@Kadrei
Copy link

Kadrei commented Nov 16, 2017

To get the most out of using flowtypes it would be amazing if sagui automatically exports the type information when building (build/dist).

As far as I understand flow automatically uses types in dependencies with the .flow - file-extension.

Imo a good approach would be to do a normal build to generate a typeless file for use and also generate the same file(s) with the type information and the file extension .flow.

This is extremely useful when building Libraries for use in other Projects as they can now fully use the type information of the library.

At least if we can trust https://javascriptplayground.com/blog/2017/01/npm-flowjs-javascript/

@Kadrei
Copy link
Author

Kadrei commented Nov 16, 2017

Another solution could be to use https://babeljs.io/docs/plugins/transform-flow-comments/

But I think this will result in an increase of filesize and would also require us to bundle external defined flowfiles in the distribution.

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

No branches or pull requests

1 participant