I'm currently developing a library using flowtype. And I'm using babel with preset-0. Also, transpile it before npm publish.
After transpiling, the type annotation has been thrown away, so projects using my library won't have benefits of type checking. I have tried some way to handle this problem.
Is there a the suggested way to do this?
And for point 2, am I doing something wrong?
Thanks
See https://github.com/facebook/flow/issues/1996#issuecomment-230919868
Just as an example of a project setup, I have this "preversion" script in one of my projects: https://github.com/rpominov/fun-task/blob/9e5b512e4d4e2b6aeaf967ca63991afa0b3c885b/package.json#L10
@rpominov Thanks!
In the changelog, the existence of a gen-flow-files command is hinted at!
It's supposed to be alpha-level, but try:
flow gen-flow-files --out-dir lib src/index.js
@LPGhatguy yeah I saw that....this is exactly what I want.
I _think_ the .js.flow build step strategy is well enough documented now that we can close this issue.
I _think_ the .js.flow build step strategy is well enough documented now that we can close this issue.
Where I can read about this strategy?