Skip to content

Commit

Permalink
fix: add additional constraint to generic
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe committed Oct 17, 2024
1 parent 805d71c commit da8e5d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/typed-vuex/src/types/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export type GettersTransformer<T extends Record<string, any>> = Readonly<
{ [P in keyof T]: ReturnType<T[P]> }
>

export const getterTree = <S, T extends GetterTree<StateType<S>, any>>(
export const getterTree = <S extends Record<string, any>, T extends GetterTree<StateType<S>, any>>(
_state: S,
tree: T
) => tree
2 changes: 1 addition & 1 deletion packages/typed-vuex/src/types/mutations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface Commit<T extends Record<string, () => any>> {
): ReturnType<T[P]>
}

export const mutationTree = <S, T extends MutationTree<StateType<S>>>(
export const mutationTree = <S extends Record<string, any>, T extends MutationTree<StateType<S>>>(
_state: S,
tree: T
) => tree

0 comments on commit da8e5d8

Please sign in to comment.