From 3e91a831217e32993869863e26cb985409e5aa70 Mon Sep 17 00:00:00 2001 From: Yury Saukou Date: Fri, 20 Dec 2024 12:35:02 +0400 Subject: [PATCH] update acq types --- acq-components/lib/hooks/useShowCallout/useShowCallout.d.ts | 3 ++- .../lib/utils/errorHandling/ResponseErrorsContainer.d.ts | 2 +- acq-components/lib/utils/errorHandling/index.d.ts | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/acq-components/lib/hooks/useShowCallout/useShowCallout.d.ts b/acq-components/lib/hooks/useShowCallout/useShowCallout.d.ts index b9207d1..94cc24c 100644 --- a/acq-components/lib/hooks/useShowCallout/useShowCallout.d.ts +++ b/acq-components/lib/hooks/useShowCallout/useShowCallout.d.ts @@ -1,8 +1,9 @@ import { CalloutContextType } from '../../../../core'; type ShowCalloutFnArgs = Omit[0], 'message'> & { - message?: string, + message?: string | React.ReactNode, messageId?: string, + values?: Record, }; type ShowCalloutFn = (args: ShowCalloutFnArgs) => void; diff --git a/acq-components/lib/utils/errorHandling/ResponseErrorsContainer.d.ts b/acq-components/lib/utils/errorHandling/ResponseErrorsContainer.d.ts index 3c9df18..aca8ec9 100644 --- a/acq-components/lib/utils/errorHandling/ResponseErrorsContainer.d.ts +++ b/acq-components/lib/utils/errorHandling/ResponseErrorsContainer.d.ts @@ -7,7 +7,7 @@ export interface ResponseErrorsContainerBody { } export interface ErrorHandlingStrategy { - handle(errors: ResponseErrorsContainer): void; + handle(errors: ResponseErrorsContainer): void | Promise; } /** diff --git a/acq-components/lib/utils/errorHandling/index.d.ts b/acq-components/lib/utils/errorHandling/index.d.ts index 872c1c8..82b4eb6 100644 --- a/acq-components/lib/utils/errorHandling/index.d.ts +++ b/acq-components/lib/utils/errorHandling/index.d.ts @@ -1 +1,4 @@ -export { ResponseErrorsContainer } from './ResponseErrorsContainer'; +export { + ErrorHandlingStrategy, + ResponseErrorsContainer, +} from './ResponseErrorsContainer';