Skip to content

Commit fae6699

Browse files
committed
Fix small oversight
1 parent 65d23bf commit fae6699

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/createStore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default function createStore<S, A extends Action, Ext, StateExt>(
110110
*
111111
* @returns The current state tree of your application.
112112
*/
113-
function getState(): S {
113+
function getState(): S & StateExt {
114114
if (isDispatching) {
115115
throw new Error(
116116
'You may not call store.getState() while the reducer is executing. ' +
@@ -119,7 +119,7 @@ export default function createStore<S, A extends Action, Ext, StateExt>(
119119
)
120120
}
121121

122-
return currentState as S
122+
return currentState as S & StateExt
123123
}
124124

125125
/**

0 commit comments

Comments
 (0)