Skip to content

Commit 2d486f2

Browse files
fix(overmind): fix typing of derived
1 parent 3b2f99b commit 2d486f2

File tree

1 file changed

+1
-1
lines changed
  • packages/node_modules/overmind/src

1 file changed

+1
-1
lines changed

packages/node_modules/overmind/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export { SERIALIZE, rehydrate } from './rehydrate'
7272

7373
export { Statemachine, statemachine } from './statemachine'
7474

75-
export const derived = <D extends (state: IState, rootState: IState) => any>(cb: D): D extends (state: IState, rootState: IState) => infer O ? O : never => {
75+
export const derived = <S extends IState, R extends IState, O>(cb: (state: S, rootState: R) => O): O => {
7676
cb[IS_DERIVED_CONSTRUCTOR] = true
7777
return cb as any
7878
}

0 commit comments

Comments
 (0)