Skip to content

Commit 6bb5bd0

Browse files
fix for type
1 parent 8dd5916 commit 6bb5bd0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/cards.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,20 @@ export const CARD_VERIFICATION_STATUS = {
9292
*
9393
* @tag Cards
9494
*/
95+
96+
/** @template T
97+
* @template K {extends keyof T}
98+
* @typedef {Pick<Partial<T>, K> & Omit<T, K>} Optional
99+
*/
100+
95101
/**
96102
* Card information collected for acquisition.
97103
* @typedef LinkCard
98104
* @property {string} cardNumber - All digits of the card
99105
* @property {CardExpiration} expiration - Card expiration date
100106
* @property {string} cardCvv - 3-4 digit card verification value
101107
* @property {string} holderName - Full name of the card holder
102-
* @property {Partial<Pick<CardBillingAddress, 'addressLine1' | 'addressLine2' | 'city' | 'stateOrProvince' | 'country'>>} billingAddress - The billing address of the card
108+
* @property {Optional<CardBillingAddress, 'addressLine1' | 'addressLine2' | 'city' | 'stateOrProvince' | 'country'>} billingAddress - The billing address of the card
103109
*
104110
* @tag Cards
105111
*/

0 commit comments

Comments
 (0)