Originally published at: https://www.sitepoint.com/class-based-vue-js-typescript/
In September of last year, Evan You (creator of Vue.js) announced plans for the next major version of the library. Vue 3.0 will feature an improved experience for TypeScript users, including native support for class-based components, and better support for type inference when writing code.
The great news is, you don't have to wait until version 3.0 is released (predicted for Q3 of 2019) to start writing your Vue apps in TypeScript. Vue's command-line tool, Vue CLI, comes with options for starting projects with the TypeScript build tooling pre-configured and includes the officially supported vue-class-component module, allowing you to write your Vue components as TypeScript classes.
This article assumes some familiarity with both Vue and the basics of TypeScript. Let's take a look and see how you can start taking advantage of static typing and class-based components in your code today.