4 ms·
> Vue itself wasn't too bad to get going with TS Last time I tried, there wasn't any support for type check across component boundaries (props, events). Did so
by lazarljubenovic 8y ago
> Vue itself wasn't too bad to get going with TS
Last time I tried, there wasn't any support for type check across component boundaries (props, events). Did something change?
A deal-breaker for me. I mostly know types from within the component; if you keep them small enough it's not much of an issue to just look up/down to check for a name, for example. But cross-component communication is where I need TS the most. Hopefully 3.0 addresses that (didn't read the whole article thoroughly, maybe it's mentioned).
- wooptoo 8y agoProps can have a type.
- basil-rash 8y agoThe type is verified at runtime though
- bradstewart 8y agoIt can also be verified at compile time when using vue-class-component.
- lazarljubenovic 8y agoIf it's a primitive type, yes. Throw in a union, a generic, or a conditional and everything blows up.
- jwdunne 8y agoOh wow. We didn't get far enough to notice that was a problem. We needed Vuex for something and that's where we got stuck and switched. It's a good job - at that stage in the project, it wouldn't have been a big problem so we didn't notice. If we had continued, I would have a hard time justifying a switch at that stage and could have been in a bit of a corner right now.