Hacker News new | ask | show | jobs
by jakear 2823 days ago
I use the decorator (“@Prop”). If that doesn’t emit the appropriate types I would be very surprised, but then again the class style syntax has always seemed to be a bit of an afterthought, so perhaps I wouldn’t be too surprised.

But regardless are those not purely runtime checks? I was of the impression that Vue would just print something to console if you messed up there, not issue an error at build time. (And playing around with an existing project it looks like it indeed does not error at build time. That or the “@Prop” decorator doesn’t do what I’d expect it to)

1 comments

Yes trying with a fresh, TS-free, default setup of Vue, the props are still verified only at run time.