diff --git a/types/react-stripe-elements/index.d.ts b/types/react-stripe-elements/index.d.ts index 0ef90dc839..d7cea98728 100644 --- a/types/react-stripe-elements/index.d.ts +++ b/types/react-stripe-elements/index.d.ts @@ -16,6 +16,8 @@ export namespace ReactStripeElements { import ElementsOptions = stripe.elements.ElementsOptions; import TokenOptions = stripe.TokenOptions; import TokenResponse = stripe.TokenResponse; + import SourceResponse = stripe.SourceResponse; + import SourceOptions = stripe.SourceOptions; /** * There's a bug in @types/stripe which defines the property as @@ -28,8 +30,7 @@ export namespace ReactStripeElements { type StripeProviderProps = { apiKey: string; stripe?: never; } | { apiKey?: never; stripe: StripeProps | null; }; interface StripeProps { - // I'm not sure what the definition for this is - createSource(): void; + createSource(sourceData?: SourceOptions): Promise; createToken(options?: TokenOptions): Promise; }