diff --git a/test/typescript/enhancers.ts b/test/typescript/enhancers.ts index fba93e479c..e317664b11 100644 --- a/test/typescript/enhancers.ts +++ b/test/typescript/enhancers.ts @@ -84,7 +84,13 @@ function stateExtension() { * Store enhancer that adds methods to the store. */ function extraMethods() { - const enhancer: StoreEnhancer<{ method(): string }> = null as any + const enhancer: StoreEnhancer<{ method(): string }> = createStore => ( + ...args + ) => { + const store = createStore(...args) + store.method = () => 'foo' + return store + } const store = createStore(reducer, enhancer)