fixing implicit any in stripe.d.ts, elminating duplicate variables between stripe and stripe-node

This commit is contained in:
Will Johnston
2015-04-13 11:19:08 -05:00
parent 4f63dbf41c
commit 1711941290
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
/// <reference path="stripe-node.d.ts" />
import Stripe = require('stripe');
import StripeNode = require('stripe');
var stripe = new Stripe("sk_test_BF573NobVn98OiIsPAv7A04K");
var stripe = new StripeNode("sk_test_BF573NobVn98OiIsPAv7A04K");
stripe.setApiVersion('2015-02-18');
stripe.customers.list({ limit: 3 }, function (err, customers) {
+2 -2
View File
@@ -4,11 +4,11 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare module 'stripe' {
var out: typeof Stripe.Stripe;
var out: typeof StripeNode.Stripe;
export = out;
}
declare module Stripe {
declare module StripeNode {
class Stripe {
static DEFAULT_HOST: string;
static DEFAULT_PORT: string;
+3 -3
View File
@@ -4,12 +4,12 @@
// Definitions: https://github.com/borisyankov/DefinitelyTyped
interface StripeStatic {
setPublishableKey(key: string);
setPublishableKey(key: string): void;
validateCardNumber(cardNumber: string): boolean;
validateExpiry(month: string, year: string): boolean;
validateCVC(cardCVC: string): boolean;
cardType(cardNumber: string): string;
getToken(token: string, responseHandler: (status: number, response: StripeTokenResponse) => void);
getToken(token: string, responseHandler: (status: number, response: StripeTokenResponse) => void): void;
card: StripeCardData;
}
@@ -58,7 +58,7 @@ interface StripeCardData {
address_zip?: string;
address_country?: string;
createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void);
createToken(data: StripeTokenData, responseHandler: (status: number, response: StripeTokenResponse) => void): void;
}
declare var Stripe: StripeStatic;