diff --git a/lib/use-redux-effect.d.ts b/lib/use-redux-effect.d.ts index a8c9272..bca6307 100644 --- a/lib/use-redux-effect.d.ts +++ b/lib/use-redux-effect.d.ts @@ -11,4 +11,4 @@ import { ReduxEffect } from './redux-effect'; * @param type * @param deps */ -export declare function useReduxEffect(effect: ReduxEffect, type: string[], deps?: DependencyList): void; +export declare function useReduxEffect(effect: ReduxEffect, type: string | string[], deps?: DependencyList): void; diff --git a/src/use-redux-effect.ts b/src/use-redux-effect.ts index e0d3c65..3324ccc 100644 --- a/src/use-redux-effect.ts +++ b/src/use-redux-effect.ts @@ -17,7 +17,7 @@ import { ReduxEffect } from './redux-effect' */ export function useReduxEffect( effect: ReduxEffect, - type: string[], + type: string | string[], deps: DependencyList = [], ): void { const currentValue = useRef(null)