direct-vuex
Advanced tools
Comparing version 0.6.5 to 0.6.6
{ | ||
"name": "direct-vuex", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"description": "Just Vuex with typing. Compatible with the Vue 3 composition API.", | ||
@@ -5,0 +5,0 @@ "author": "Paleo", |
@@ -17,3 +17,3 @@ # direct-vuex | ||
The store is implemented almost in the same way as usual (ie. without typing). However, **it is necessary to append `as const` at the end of store and module implementation objects**. It will help direct-vuex to better infer types. | ||
The store can be implemented almost in the same way as usual. However, **it is necessary to append `as const` at the end of store and module implementation objects**. It will help direct-vuex to better infer types. | ||
@@ -93,3 +93,3 @@ Create the store: | ||
### Use typed wrappers from action implementations | ||
### Use typed wrappers in action implementations | ||
@@ -112,3 +112,3 @@ Here is an example on how to do in a module: | ||
And the same example, but from the root store: | ||
And the same example, but in the root store: | ||
@@ -124,3 +124,3 @@ ```ts | ||
Warning: Typing action contexts implies that TypeScript should never be allowed to infer the return type of an action from the context of the action. Indeed, this kind of typing would be recursive, since the context includes the return value of the action. When this happens, TypeScript passes the whole context to `any`. _Tl;dr; Declare the return type of actions where it exists!_ | ||
Warning: Types in the context of actions implies that TypeScript should never be allowed to infer the return type of an action from the context of the action. Indeed, this kind of typing would be recursive, since the context includes the return value of the action. When this happens, TypeScript passes the whole context to `any`. _Tl;dr; Declare the return type of actions where it exists!_ | ||
@@ -127,0 +127,0 @@ ## Contribute |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29183