vuex-composition-helpers
Advanced tools
Comparing version 1.0.25 to 1.0.26
@@ -1,2 +0,2 @@ | ||
import { computed } from 'vue'; | ||
import { computed } from '@vue/composition-api'; | ||
import { computedGetter, getAction, getMutation, getStoreFromInstance, useMapping } from './util'; | ||
@@ -3,0 +3,0 @@ function computedState(store, prop) { |
@@ -1,2 +0,2 @@ | ||
import { computed } from 'vue'; | ||
import { computed } from '@vue/composition-api'; | ||
import { computedGetter, getAction, getMutation, getStoreFromInstance, useMapping } from './util'; | ||
@@ -3,0 +3,0 @@ function computedState(store, namespace, prop) { |
@@ -1,3 +0,2 @@ | ||
import { Ref } from 'vue'; | ||
import { Store } from 'vuex/types'; | ||
import { Ref } from '@vue/composition-api'; | ||
declare type OmitFirstArg<F, TReturn> = F extends (x: any, ...args: infer P) => any ? (...args: P) => TReturn : never; | ||
@@ -20,7 +19,7 @@ declare type InferType<T, TUnknown = any> = T extends (...args: any) => any ? OmitFirstArg<T, ReturnType<T>> : T extends unknown ? TUnknown : T; | ||
}; | ||
export declare function computedGetter<T = any>(store: any, prop: string): import("vue").ComputedRef<T>; | ||
export declare function computedGetter<T = any>(store: any, prop: string): import("@vue/composition-api").ComputedRef<T>; | ||
export declare function getMutation(store: any, mutation: string): Function; | ||
export declare function getAction(store: any, action: string): Function; | ||
export declare function useMapping<T>(store: any, namespace: string | null, map: KnownKeys<T>[] | Array<string> | undefined, cb: Function): any; | ||
export declare function getStoreFromInstance<T = any>(): Store<T>; | ||
export declare function getStoreFromInstance(): import("vuex").Store<any>; | ||
export {}; |
@@ -1,2 +0,2 @@ | ||
import { computed, getCurrentInstance } from 'vue'; | ||
import { computed, getCurrentInstance } from '@vue/composition-api'; | ||
function runCB(cb, store, namespace, prop) { | ||
@@ -52,4 +52,5 @@ if (cb.length === 3) { // choose which signature to pass to cb function | ||
} | ||
return vm.proxy?.$store; | ||
const { $store } = 'proxy' in vm ? vm.proxy : vm; | ||
return $store; | ||
} | ||
//# sourceMappingURL=util.js.map |
{ | ||
"name": "vuex-composition-helpers", | ||
"version": "1.0.25", | ||
"version": "1.0.26", | ||
"description": "Helpers to use Vuex store form Vue Composition API", | ||
@@ -5,0 +5,0 @@ "author": "David Meir-Levy <davidmeirlevy@gmail.com>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
36546