Skip to content

Commit b13b2e5

Browse files
authored
fix: Return an any from createReduxEnhancer to avoid type conflicts (#2834)
1 parent e22a965 commit b13b2e5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/react/src/redux.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@ type PreloadedState<S> = Required<S> extends {
3939
: never
4040
: { [K in keyof S]: S[K] extends string | number | boolean | symbol ? S[K] : PreloadedState<S[K]> };
4141

42-
type StoreEnhancer<Ext = Record<string, unknown>, StateExt = never> = (
43-
next: StoreEnhancerStoreCreator<Ext, StateExt>,
44-
) => StoreEnhancerStoreCreator<Ext, StateExt>;
45-
4642
type StoreEnhancerStoreCreator<Ext = Record<string, unknown>, StateExt = never> = <
4743
S = any,
4844
A extends Action = AnyAction
@@ -84,7 +80,8 @@ const defaultOptions: SentryEnhancerOptions = {
8480
*
8581
* @param enhancerOptions Options to pass to the enhancer
8682
*/
87-
function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): StoreEnhancer {
83+
function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): any {
84+
// Note: We return an any type as to not have type conflicts.
8885
const options = {
8986
...defaultOptions,
9087
...enhancerOptions,

0 commit comments

Comments
 (0)