You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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., have dist/mapbox-gl.js.flow look like:
// @flowexport*from'../src/index.js';
This almost works, except that the downstream package would need to add many of the ignores that we use:
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: