From cc79b55ab42322955f115750e2f7b682541fac14 Mon Sep 17 00:00:00 2001 From: Remco Tolsma <869674+remcotolsma@users.noreply.github.com> Date: Tue, 23 Jan 2024 11:49:27 +0100 Subject: [PATCH] Add `AdyenCheckoutError` definition. --- js/src/checkout-drop-in.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/js/src/checkout-drop-in.js b/js/src/checkout-drop-in.js index 098fc5c..684ac61 100644 --- a/js/src/checkout-drop-in.js +++ b/js/src/checkout-drop-in.js @@ -1,5 +1,15 @@ /* global AdyenCheckout, pronamicPayAdyenCheckout */ +/** + * Adyen checkout error definition. + * + * @see https://github.com/Adyen/adyen-web/blob/v5.57.0/packages/lib/src/core/Errors/AdyenCheckoutError.ts + * @typedef AdyenCheckoutError + * @type {Object} + * @property {string} name - Adyen error name. + * @property {string} message - Adyen error message. + */ + 'use strict'; ( async function () { @@ -23,7 +33,7 @@ * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error * @see https://github.com/Adyen/adyen-web/blob/v5.15.0/packages/lib/src/core/Errors/AdyenCheckoutError.ts * @see https://github.com/Adyen/adyen-web/blob/v5.15.0/packages/lib/src/components/UIElement.tsx#L115-L126 - * @param AdyenCheckoutError error Adyen checkout error. + * @param {AdyenCheckoutError} error Adyen checkout error. */ onError: ( error ) => { if ( 'CANCEL' === error.name ) {