diff --git a/src/Datatrans.ts b/src/Datatrans.ts index 2109faf..f484118 100644 --- a/src/Datatrans.ts +++ b/src/Datatrans.ts @@ -22,7 +22,7 @@ export interface GlobalDatatransApi { */ export interface DatatransLightboxConfig { closed?: () => void; - error?: () => void; + error?: (error: { message: string; detail: string }) => void; form?: unknown; loaded?: () => void; opened?: () => void; diff --git a/src/Lightbox.tsx b/src/Lightbox.tsx index 744d728..ec2c9a0 100644 --- a/src/Lightbox.tsx +++ b/src/Lightbox.tsx @@ -12,7 +12,7 @@ export interface LightboxProps { onLoaded?: () => void onOpened?: () => void onCancelled?: () => void - onError?: () => void + onError?: (error: { message: string; detail: string }) => void } declare let window: Window & {