Skip to content

Commit

Permalink
Adjusting paymentMethodConfiguration type to support txVariants not m…
Browse files Browse the repository at this point in the history
…apped internally (#2349)

* fix: added type to paymentmethods configuration

* fix: changeset

* fix: improved type
  • Loading branch information
ribeiroguilherme authored Oct 16, 2023
1 parent a95b4f1 commit 4f3fedf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/good-boxes-taste.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 4 additions & 1 deletion packages/lib/src/core/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -172,4 +172,7 @@ export type PaymentMethodsConfiguration =
}
| {
[key in PaymentActionsType]?: any;
}
| {
[key: string]: UIElementProps;
};

0 comments on commit 4f3fedf

Please sign in to comment.