In files like https://github.com/vuejs/vue/blob/dev/flow/component.js there's a lot of uses of any, Object, and Function.
I'm currently improving the documentation around this in Flow, because we don't do a good enough job of explaining it right now. Sorry about that.
These types aren't actually type-safe. They are there for convenience purposes.
any you should use mixed (or a more specific type).Function you should use (type, type) => typeObject you should use { prop: type } or { [key: type]: type } (for maps)This will drastically improve user's experience with Vue using Flow.
Yep, it could definitely use some improvements! The declarations were added mid-way when a pure ES codebase was already in place, so there are quite a few places I was just trying to get by. My Flow knowledge is also limited so I'd appreciate PRs.
@thejameskyle have you any link about using flow with vuejs?
i was try yesterday, but i was have much problems
@yyx990803 It would be great to have documentation like the one that was made for TS.
Is currently someone working on this? If not I would like to try it.
@MarkusToe Thanks for offering to help! :) Currently we are not actively working on improving the typings - we only add/change stuff we find while working on other parts, fixing bugs etc.
So it would be great if you can improve the situation here!
Most helpful comment
Yep, it could definitely use some improvements! The declarations were added mid-way when a pure ES codebase was already in place, so there are quite a few places I was just trying to get by. My Flow knowledge is also limited so I'd appreciate PRs.