Update @types/react-stripe-elements/index.d.ts (#21830)

* Update index.d.ts for PaymentRequestButtonElement

Update the type definitions to support the PaymentRequestButtonElement in react-stripe-elements as currently they are outdated.

* Fix lint errors
This commit is contained in:
sonnysangha
2018-01-03 06:51:42 +00:00
committed by Mohamed Hegazy
parent 8f69c279a4
commit 117bff6e3c

View File

@@ -2,6 +2,7 @@
// Project: https://github.com/stripe/react-stripe-elements#readme
// Definitions by: dan-j <https://github.com/dan-j>
// Santiago Doldan <https://github.com/santiagodoldan>
// sonnysangha <https://github.com/sonnysangha>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
@@ -44,6 +45,8 @@ export namespace ReactStripeElements {
interface ElementProps extends ElementsOptions {
className?: string;
paymentRequest?: object;
elementRef?(): void;
onChange?(event: ElementChangeResponse): void;
@@ -80,3 +83,6 @@ export class CardCVCElement extends React.Component<ReactStripeElements.ElementP
export class PostalCodeElement extends React.Component<ReactStripeElements.ElementProps> {
}
export class PaymentRequestButtonElement extends React.Component<ReactStripeElements.ElementProps> {
}