-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Publish Flow type definitions alongside compiled bundle #6963
Labels
Comments
Can you try this in the .flowconfig? |
This was referenced Jul 26, 2018
Merged
anandthakker
added a commit
that referenced
this issue
Aug 3, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There isn't currently a straightforward way for a downstream consumer of Mapbox GL JS to benefit from the Flow type annotations that exist throughout our source code (and, specifically, on our public API). We should find a way to distribute
dist/mapbox-gl.js.flow
alongside the main bundle.facebook/flow#5871 suggests that the
flow gen-flow-types
tool may get deprecated soon and so we probably don't want to rely on that.Since we do include
src/
in our npm package, we could use the approach mentioned in facebook/flow#5871 (comment) -- i.e., havedist/mapbox-gl.js.flow
look like:This almost works, except that the downstream package would need to add many of the ignores that we use:
mapbox-gl-js/.flowconfig
Lines 2 to 12 in f55e548
The text was updated successfully, but these errors were encountered: