mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 15:57:13 +00:00
stripe-v3: update typing for idealbankelement
This commit is contained in:
Vendored
+3
-3
@@ -1,4 +1,4 @@
|
||||
// Type definitions for stripe-v3 3.0
|
||||
// Type definitions for stripe-v3 3.1
|
||||
// Project: https://stripe.com/
|
||||
// Definitions by: Andy Hawkins <https://github.com/a904guy/,http://a904guy.com>
|
||||
// Eric J. Smith <https://github.com/ejsmith>
|
||||
@@ -314,7 +314,7 @@ declare namespace stripe {
|
||||
brand: string;
|
||||
complete: boolean;
|
||||
empty: boolean;
|
||||
value?: { postalCode: string | number };
|
||||
value?: { postalCode: string | number } | string;
|
||||
country?: string;
|
||||
bankName?: string;
|
||||
error?: Error;
|
||||
@@ -325,7 +325,7 @@ declare namespace stripe {
|
||||
locale?: string;
|
||||
}
|
||||
|
||||
type elementsType = 'card' | 'cardNumber' | 'cardExpiry' | 'cardCvc' | 'postalCode' | 'paymentRequestButton' | 'iban';
|
||||
type elementsType = 'card' | 'cardNumber' | 'cardExpiry' | 'cardCvc' | 'postalCode' | 'paymentRequestButton' | 'iban' | 'idealBank';
|
||||
interface Elements {
|
||||
create(type: elementsType, options?: ElementsOptions): Element;
|
||||
}
|
||||
|
||||
@@ -218,5 +218,12 @@ describe("Stripe v2 & v3", () => {
|
||||
supportedCountries: ['SEPA'],
|
||||
placeholderCountry: 'AT'
|
||||
});
|
||||
const idealBank = elements.create('idealBank');
|
||||
idealBank.on('change', (resp: stripe.elements.ElementChangeResponse) => {
|
||||
if (resp.value && typeof resp.value !== 'object') {
|
||||
console.log(resp.value.length);
|
||||
const string: string = resp.value;
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user