Skip to content

Commit

Permalink
fix: Return an any from createReduxEnhancer to avoid type conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
jennmueng committed Aug 21, 2020
1 parent 02ac212 commit 676695c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packages/react/src/redux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ type PreloadedState<S> = Required<S> extends {
: never
: { [K in keyof S]: S[K] extends string | number | boolean | symbol ? S[K] : PreloadedState<S[K]> };

type StoreEnhancer<Ext = Record<string, unknown>, StateExt = never> = (
next: StoreEnhancerStoreCreator<Ext, StateExt>,
) => StoreEnhancerStoreCreator<Ext, StateExt>;

type StoreEnhancerStoreCreator<Ext = Record<string, unknown>, StateExt = never> = <
S = any,
A extends Action = AnyAction
Expand Down Expand Up @@ -84,7 +80,8 @@ const defaultOptions: SentryEnhancerOptions = {
*
* @param enhancerOptions Options to pass to the enhancer
*/
function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): StoreEnhancer {
function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): any {
// Note: We return an any type as to not have type conflicts.
const options = {
...defaultOptions,
...enhancerOptions,
Expand Down

0 comments on commit 676695c

Please sign in to comment.