From 7f3c985d438d519e46fc284a54747f6ee6094a65 Mon Sep 17 00:00:00 2001 From: ianschmitz Date: Wed, 10 Dec 2014 16:57:40 -0800 Subject: [PATCH 1/2] Update stripe.d.ts Edited definition file to align with: https://stripe.com/docs/stripe.js#createToken --- stripe/stripe.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stripe/stripe.d.ts b/stripe/stripe.d.ts index f5c1b3ff0..6d2080b85 100644 --- a/stripe/stripe.d.ts +++ b/stripe/stripe.d.ts @@ -5,7 +5,6 @@ interface StripeStatic { setPublishableKey(key: string); - createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void); validateCardNumber(cardNumber: string): boolean; validateExpiry(month: string, year: string): boolean; validateCVC(cardCVC: string): boolean; @@ -57,6 +56,7 @@ interface StripeCardData { address_state?: string; address_zip?: string; address_country?: string; + createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void); } -declare var Stripe: StripeStatic; \ No newline at end of file +declare var Stripe: StripeStatic; From 866c253cbdc0e47704fb741f29cebf74ab0ac300 Mon Sep 17 00:00:00 2001 From: ianschmitz Date: Thu, 11 Dec 2014 11:11:03 -0800 Subject: [PATCH 2/2] Update stripe.d.ts Forgot to add "card" to the StripeStatic interface. --- stripe/stripe.d.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stripe/stripe.d.ts b/stripe/stripe.d.ts index 6d2080b85..2d5005618 100644 --- a/stripe/stripe.d.ts +++ b/stripe/stripe.d.ts @@ -1,4 +1,4 @@ -// Type definitions for stripe +// Type definitions for stripe // Project: https://stripe.com/ // Definitions by: Eric J. Smith // Definitions: https://github.com/borisyankov/DefinitelyTyped @@ -10,6 +10,7 @@ interface StripeStatic { validateCVC(cardCVC: string): boolean; cardType(cardNumber: string): string; getToken(token: string, responseHandler: (status: number, response: StripeTokenResponse) => void); + card: StripeCardData; } interface StripeTokenData { @@ -56,6 +57,7 @@ interface StripeCardData { address_state?: string; address_zip?: string; address_country?: string; + createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void); }