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
I want to use Flow types with the minimized files in dist folder. In order to do so, the flow types must be available either in the distribution or in the Flow typed repo, which is the central source of distribution for flow types for vendor libraries.
Design Alternatives
Current distribution already includes some flow-typed, but these appear to be ad hoc, and for internal use only. One alternative is to include the types in the repo alongside the code. But this would make types inaccessible to those who load the distribution via url or some other way into the global context of the browser.
Implementation
Flow binary has an experimental gen-flow-files command.
$ flow gen-flow-files src --out-dir types
A possible release workflow could use this to generate the API types for the library, and submit a PR for them to the flow-typed repository.
The text was updated successfully, but these errors were encountered:
I'm going to close this in favor of #6963 -- we're interested in providing Flow definitions for downstream projects to use, but prefer to publish them with our npm package rather than via flow-typed (as is recommended in the flow-typed FAQ).
One alternative is to include the types in the repo alongside the code. But this would make types inaccessible to those who load the distribution via url or some other way into the global context of the browser.
I think one option for users in this situation, once #6963 is done, would be to pull the mapbox-gl npm package and use the flow definitions from there.
Motivation
I want to use Flow types with the minimized files in dist folder. In order to do so, the flow types must be available either in the distribution or in the Flow typed repo, which is the central source of distribution for flow types for vendor libraries.
Design Alternatives
Current distribution already includes some flow-typed, but these appear to be ad hoc, and for internal use only. One alternative is to include the types in the repo alongside the code. But this would make types inaccessible to those who load the distribution via url or some other way into the global context of the browser.
Implementation
Flow binary has an experimental
gen-flow-files
command.A possible release workflow could use this to generate the API types for the library, and submit a PR for them to the flow-typed repository.
The text was updated successfully, but these errors were encountered: