-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
correctly expose flow typings #1254
correctly expose flow typings #1254
Conversation
Apparently references don't work in titles... #1232 |
@Kriegslustig just double check: you verified this will work when installing the package and import stuff using |
Yes, this works. With one caveat though, consumers will need to remove MobX from flow config
|
I documented it in the README. Should I also write something into the changelog? |
@Kriegslustig yep, please put it in the changelog.md as well :) |
done 👍 |
Thanks! Merged and will release soon as 3.4.0 |
@Kriegslustig, @mweststrate: I think a lot of people might accidentally update MobX from v3.3.3 to v3.4.0 (by just removing and reinstalling all the node_modules). If they do that but they still use MobX's flow type definition based on the old README, they will get a ton of flow errors. I have a blog post to explain this: https://medium.com/@xiaoyangzhao/mobx-and-flow-typed-1d411a7b47fb Maybe we need to provide more info in the readme? |
@Kriegslustig Yes I think extending the information will be helpful (especially for people who are not an expert in flow). But it not necessary. I did check the changelog but I wish I have seen it earlier :) This is how I encountered the issue:
So this exposes all the mobx type definitions to the global scope, and flow throws a lot of errors. It took me a while to figure the issue. I hope I could have checked the README and changelog earlier. So I figure adding some more info might save other people's time later. |
PR for changelog is welcome! (and tip: make sure that removing node_modules
doesn't upgrade your modules unintentionally. Use yarn, npm lock files or
npm shrinkwrap, without them it is impossible to create reliable /
reproducible builds for your project)
Op vr 29 dec. 2017 om 09:56 schreef Luca Nils Schmid <
[email protected]>:
… @zhaocnus <https://github.com/zhaocnus> have you read the changelog
<https://github.com/mobxjs/mobx/blob/master/CHANGELOG.md#340>? Maybe we
can extend this information, if it's not sufficient.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1254 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABvGhMLUX_yzW1wsN08RPlkDYi7EsSd_ks5tFKk-gaJpZM4Qqjbs>
.
|
@mweststrate Thanks for the tip! I've learned my lesson. I will create a PR. |
With this PR consumers can use the Flow type definitions without needing any configuration.