@@ -14,6 +14,8 @@ import ActionTypes from './utils/actionTypes'
1414import isPlainObject from './utils/isPlainObject'
1515import { kindOf } from './utils/kindOf'
1616
17+ type NoInfer < T > = [ T ] [ T extends any ? 0 : never ]
18+
1719/**
1820 * @deprecated
1921 *
@@ -47,7 +49,7 @@ export function createStore<
4749> (
4850 reducer : Reducer < S , A > ,
4951 enhancer ?: StoreEnhancer < Ext , StateExt >
50- ) : Store < S , A , UnknownIfNonSpecific < StateExt > > & Ext
52+ ) : Store < S , A , UnknownIfNonSpecific < StateExt > > & NoInfer < Ext >
5153/**
5254 * @deprecated
5355 *
@@ -83,7 +85,7 @@ export function createStore<
8385 reducer : Reducer < S , A , PreloadedState > ,
8486 preloadedState ?: PreloadedState | undefined ,
8587 enhancer ?: StoreEnhancer < Ext , StateExt >
86- ) : Store < S , A , UnknownIfNonSpecific < StateExt > > & Ext
88+ ) : Store < S , A , UnknownIfNonSpecific < StateExt > > & NoInfer < Ext >
8789export function createStore <
8890 S ,
8991 A extends Action ,
@@ -94,7 +96,7 @@ export function createStore<
9496 reducer : Reducer < S , A , PreloadedState > ,
9597 preloadedState ?: PreloadedState | StoreEnhancer < Ext , StateExt > | undefined ,
9698 enhancer ?: StoreEnhancer < Ext , StateExt >
97- ) : Store < S , A , UnknownIfNonSpecific < StateExt > > & Ext {
99+ ) : Store < S , A , UnknownIfNonSpecific < StateExt > > & NoInfer < Ext > {
98100 if ( typeof reducer !== 'function' ) {
99101 throw new Error (
100102 `Expected the root reducer to be a function. Instead, received: '${ kindOf (
0 commit comments