Vuex: Move project to typescript (not just add a definition file)

Created on 27 Aug 2020  路  5Comments  路  Source: vuejs/vuex

What problem does this feature solve?

Any overlooked type errors in the current project

The internet is full of reasons to move to typescript.

What does the proposed API look like?

Moving all *.js files to *.ts
And adding a tsconfig.json file to build the js files

Most helpful comment

We're planning to do it in Vuex 5! Currently, just changing Vuex 4's .js to .ts file will not improve any typings so I believe it's not worth it. Vuex 5 will still take some more time but stay tuned 馃憤

All 5 comments

Check v4 branch.

@pikax A quick look at the src directory in branch shows .js files
https://github.com/vuejs/vuex/tree/4.0/src

My mistake.

Renaming the files to .ts is not a good solution.

@pikax how so?

We're planning to do it in Vuex 5! Currently, just changing Vuex 4's .js to .ts file will not improve any typings so I believe it's not worth it. Vuex 5 will still take some more time but stay tuned 馃憤

Was this page helpful?
0 / 5 - 0 ratings