Closed
Description
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.
- Instead of
any
you should usemixed
(or a more specific type). - Instead of
Function
you should use(type, type) => type
- Instead of
Object
you should use{ prop: type }
or{ [key: type]: type }
(for maps)
This will drastically improve user's experience with Vue using Flow.