Vuex: Remove TS type definition and move to DefinitelyTyped

Created on 25 Sep 2018  路  4Comments  路  Source: vuejs/vuex

What problem does this feature solve?

Background:

It's hard to say TypeScript type definition development has been active in this repo. Searching TypeScript tags, all 7 issues TS-related remain open, and 3 out of 5 PRs are waiting for reviewing, including one opened back in January 2018.

If the repository includes type definition, it would be nice if the repository maintainers are responsible for maintaining definition actively as well as library itself.

Suggestion:

Remove TypeScipt type definition in this repository, and move them to DefinitelyTyped, so type definition development wouldn't be the tasks for Vuex maintainers. I would expect type definition development would be more active with this since it'll be easier to review/merge.

What does the proposed API look like?

Type definition are removed. Users will have to install @types/vuex, but it will be more accurate/strict/up-to-date definition.

Most helpful comment

As Vue 3.0 is being written in TypeScript, is there going to be any change to VueX? Also due to the language change in Vue 3.0 - can we expect to see better support here too?

All 4 comments

I have the same issue. because ActionHandler is not exported in the latest release (November 2017!) I can't use the current version of the type definition where the ActionHandler is fixed and exported. I have to wait for the next release of the whole package instead of just releasing a new version of the type definition.

As Vue 3.0 is being written in TypeScript, is there going to be any change to VueX? Also due to the language change in Vue 3.0 - can we expect to see better support here too?

Is there any works on making vuex typesafe or make it more IDE friendly so I can see expected args for action etc

We'll be closing this issue for now, since we do not plan to move typings to DefinitelyTyped. We do see there's a lot to improve with Vuex typings, and we're aiming to do much better in upcoming Vuex 5. But at the moment, having type file at this repo is not the bottle neck.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fnlctrl picture fnlctrl  路  4Comments

jbruni picture jbruni  路  3Comments

gdelazzari picture gdelazzari  路  3Comments

Ge-yuan-jun picture Ge-yuan-jun  路  3Comments

visualjerk picture visualjerk  路  3Comments