From 10621d70027ef8216300c54ade515dbb31dd4538 Mon Sep 17 00:00:00 2001 From: Niels Peschel <52583415+NielsJPeschel@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:14:30 -0400 Subject: [PATCH 1/2] Enable useServiceEffect to receive a _Promisable_ service param --- hooks/useServiceEffect/useServiceEffect.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hooks/useServiceEffect/useServiceEffect.ts b/hooks/useServiceEffect/useServiceEffect.ts index 21a617c..58e69b4 100644 --- a/hooks/useServiceEffect/useServiceEffect.ts +++ b/hooks/useServiceEffect/useServiceEffect.ts @@ -1,8 +1,9 @@ import {useEffect} from 'react'; +import {Promisable} from '../../types'; export function useServiceEffect( isPending: boolean, - service: () => Promise, + service: () => Promisable, onServiceCallResolved?: (response: T) => void, onServiceCallRejected?: (error: unknown) => void, onInitiateServiceCall?: () => void, From e08f655677cd9b5aa3b677455448a89a518aeb3b Mon Sep 17 00:00:00 2001 From: Niels Peschel <52583415+NielsJPeschel@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:40:37 -0400 Subject: [PATCH 2/2] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3aa3312..0fef930 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@optum/react-hooks", - "version": "1.0.0", + "version": "1.0.1-next.0", "description": "A reusable set of React hooks", "repository": "https://github.com/Optum/react-hooks", "license": "Apache 2.0",