Adjusting paymentMethodConfiguration type to support txVariants not mapped internally (#2349)

* fix: added type to paymentmethods configuration

* fix: changeset

* fix: improved type
This commit is contained in:
Guilherme Ribeiro
2023-10-16 16:14:35 +02:00
committed by GitHub
parent a95b4f1208
commit 4f3fedff5f
2 changed files with 9 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
---
'@adyen/adyen-web': patch
---
Fix Typescript definition for paymentMethodsConfiguration, allowing usage of Tx variants that are not defined in the codebase

View File

@@ -3,7 +3,7 @@ import { PaymentMethods, PaymentMethodOptions, PaymentActionsType, PaymentAmount
import { AnalyticsOptions } from './Analytics/types';
import { PaymentMethodsResponse } from './ProcessResponse/PaymentMethodsResponse/types';
import { RiskModuleOptions } from './RiskModule/RiskModule';
import { ActionHandledReturnObject, OnPaymentCompletedData, PaymentData } from '../components/types';
import { ActionHandledReturnObject, OnPaymentCompletedData, PaymentData, UIElementProps } from '../components/types';
import UIElement from '../components/UIElement';
import AdyenCheckoutError from './Errors/AdyenCheckoutError';
import { GiftCardElementData } from '../components/Giftcard/types';
@@ -172,4 +172,7 @@ export type PaymentMethodsConfiguration =
}
| {
[key in PaymentActionsType]?: any;
}
| {
[key: string]: UIElementProps;
};