usystems / vuejs-typescript-component

TypeScript decorator to build a vuejs component
MIT License
12 stars 1 forks source link

type-safety #1

Open mindplay-dk opened 8 years ago

mindplay-dk commented 8 years ago

Thanks for sharing this!

I loaded up the examples in VS Code to see how it works at design-time, and first thing I noticed about the examples is, they're not very type-safe?

For example, model: any in tree.ts provides no type-safety, not even when using Vue's built-in value decorators, such as this.model.$add(...).

Have you gotten any further with this pattern, on your own projects, since posting this six months ago?

If so, would you consider maybe updating one of the example with full tape-safety?

Thanks again, this is a great starting point!

gamperl commented 8 years ago

It seems, the vue.d.ts is not up to date. Try using the ones from https://github.com/kaorun343/vue-typescript.