diff --git a/.changeset/good-boxes-taste.md b/.changeset/good-boxes-taste.md new file mode 100644 index 00000000..72917812 --- /dev/null +++ b/.changeset/good-boxes-taste.md @@ -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 diff --git a/packages/lib/src/core/types.ts b/packages/lib/src/core/types.ts index 1fc54085..a1170a99 100644 --- a/packages/lib/src/core/types.ts +++ b/packages/lib/src/core/types.ts @@ -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; };