Moving existing Vue2 app to TypeScript

I’ve got some situation when I was wanted to update my current Vue app to TypeScript. I considered on only updating it partially:

  1. update store to typescript
  2. update components to typescript

So for that I did the following steps:

  1. Install vue cli tool: npm install -g @vue/cli
  2. Run vue add typescript command in your project
  3. When it asks allowJs set it to true as you have lots of components/js files in your project
  4. Done. Main file would be changed from .js into .ts, it may have some issues.

If you need some info about migrating store to typescript feel free to ping me in a comment – I’ll write an article if that would be needed for anybody.

Click to rate this post!
[Total: 1 Average: 5]

You May Also Like

About the Author: deniskoronets

Leave a Reply

Your email address will not be published.