Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Methuselah96 committed May 18, 2021
1 parent 7271e83 commit 92cf2a2
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions test/typescript/enhancers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import { StoreEnhancer, Action, AnyAction, Reducer, createStore } from '../..'
import {
StoreEnhancer,
Action,
AnyAction,
Reducer,
createStore,
Store
} from '../..'

interface State {
someField: 'string'
Expand Down Expand Up @@ -372,9 +379,10 @@ function composedEnhancers() {
return newStore
}

const enhancedStore = createStore(reducer, createStore =>
const composedEnhancer: StoreEnhancer<Ext1 & Ext2> = createStore =>
enhancer2(enhancer1(createStore))
)

const enhancedStore = createStore(reducer, composedEnhancer)
enhancedStore.enhancer1
enhancedStore.enhancer2
// typings:expect-error
Expand Down

0 comments on commit 92cf2a2

Please sign in to comment.