Closed EvHaus closed 7 years ago
There are two articles about this on Flowtype that should help here:
https://flow.org/en/docs/lang/variance/ https://flow.org/en/docs/lang/depth-subtyping/
I think the functions may just need to add +
to the generics passed into them.
I have a fix in #246 , but not sure if it's correct. As far as I understand Flow thinks that this code is unsafe because subscribe()
may mutate passed object, and I've tricked Flow to think that It's alright using interface.
See also https://github.com/facebook/flow/issues/2354
/cc @hallettj @AgentME
Yeahh variance errors are fun. I think that pull request looks right.
Ok, probably should merge it.
After upgrading to Flow 0.50.0 I am now getting the following Flow errors coming from
kefir
: