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
Contribute newer flow definitions for v3.x to flow-typed #1365
Comments
I've written a vendored immutable binding (for the 3.x.x branch) that seems to work in my projects: https://gist.github.com/bassjacob/b23e7bde65291ed927d46d12ccc1512f I've placed that file in I had to change the format from the file in the repo because it declares some classes and types globally which conflict with React. @leebyron are the |
(Also, please let me know if that gist is unsound or broken in some way. I'm fairly new to writing flow bindings) |
I'm more than happy to support community led efforts for newer flow types for prior versions of this library, unfortunately that's not something I have time to do myself. I encourage anyone interested in this to contribute pull requests to the flow-typed repo. I've tagged this issue as help wanted in case anyone would like to contribute This repo will continue to host (and distribute on npm) a flow definition file for the latest shipping version. To get the best type definitions, we may rely on newer flow features that require a newer version of flow. |
I'd be happy to PR this to flow-typed and maintain it. I'd be a little concerned at deviating too far from the internal types for this lib, but I don't think it should be too large a job. Do you have any information around the |
v3 exports a type with this name, so a flow definition file should type it. It was renamed in v4 to avoid this exact ambiguity. To account for this we defined an ESIterable type so both could be used in the definition file.
You can take a look at the improvements in the v4 definitions which have dramatically reduced the reliance of |
That makes total sense. I didn't realise flow would scope Thanks for giving me some pointers 😄 I'll report back here once things are moving. |
As discussed in facebook/flow#4917,
.js.flow
files provide no way to simultaneously support different versions of Flow. However,flow-typed
allows you to store defs for multiple versions of flow for a single version ofimmutable
.This is the first snag I've hit trying to upgrade the dozens of packages in my company to Flow 0.56; to get compatible defs, I would have to install a release candidate of
immutable
, which I don't want to do for production code, so I have no choice but to wait or ignore any flow checking onimmutable
altogether.So, until if and when flow supports defs for multiple flow versions within a package itself, I'd propose storing the typedefs in flow-typed as soon as possible instead of in this package.
Thoughts?
The text was updated successfully, but these errors were encountered: