Skip to content

Commit da8e5d8

Browse files
committed
fix: add additional constraint to generic
1 parent 805d71c commit da8e5d8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/typed-vuex/src/types/getters.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export type GettersTransformer<T extends Record<string, any>> = Readonly<
55
{ [P in keyof T]: ReturnType<T[P]> }
66
>
77

8-
export const getterTree = <S, T extends GetterTree<StateType<S>, any>>(
8+
export const getterTree = <S extends Record<string, any>, T extends GetterTree<StateType<S>, any>>(
99
_state: S,
1010
tree: T
1111
) => tree

packages/typed-vuex/src/types/mutations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface Commit<T extends Record<string, () => any>> {
1919
): ReturnType<T[P]>
2020
}
2121

22-
export const mutationTree = <S, T extends MutationTree<StateType<S>>>(
22+
export const mutationTree = <S extends Record<string, any>, T extends MutationTree<StateType<S>>>(
2323
_state: S,
2424
tree: T
2525
) => tree

0 commit comments

Comments
 (0)