Hello guys,, I found a bug which is quite annoying when we you use typescript, the type definition for cardholderName is missing. Example:
export const braintreeDropInConfig = ({
braintreeClientToken,
threeDSecure,
}: {
braintreeClientToken: string;
threeDSecure: Options['threeDSecure'];
}): Options => ({
authorization: braintreeClientToken,
container: '#dropin-container',
threeDSecure: threeDSecure,
card: {
cardholderName: {
required: true,
},
overrides: {
fields: {
// cardholderName is not in the types
//@ts-expect-error - Braintree types are not updated.
cardholderName: {
placeholder: `Cardholder's name test`,
},
expirationDate: {
placeholder: 'Expiry date (MM/YYYY)',
},
cvv: {
placeholder: 'CVV',
},
number: {
placeholder: 'Card number',
},
},
},
},
});
Braintree version: "braintree-web-drop-in": "^1.44.0".
The correct behaviour should be avoid adding @ts-expect-error .

As we can see in the attached image, the cardholderName it works when it's provided.
Hello guys,, I found a bug which is quite annoying when we you use typescript, the type definition for
cardholderNameis missing. Example:Braintree version:
"braintree-web-drop-in": "^1.44.0".The correct behaviour should be avoid adding
@ts-expect-error.As we can see in the attached image, the cardholderName it works when it's provided.