From 8b9a7f70e6cbc84af65a98b9ea4309864ef862da Mon Sep 17 00:00:00 2001 From: Luke Brandon Farrell Date: Thu, 10 Jun 2021 14:34:22 +0100 Subject: [PATCH] fix(typescript): fixed to string[] | string instead of string[] on type param --- lib/use-redux-effect.d.ts | 2 +- src/use-redux-effect.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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)