diff --git a/types/react-stripe-elements/index.d.ts b/types/react-stripe-elements/index.d.ts index fa68cb1b31..e8e88757b2 100644 --- a/types/react-stripe-elements/index.d.ts +++ b/types/react-stripe-elements/index.d.ts @@ -30,7 +30,7 @@ export namespace ReactStripeElements { interface StripeProviderOptions { stripeAccount?: string; } - type StripeProviderProps = { apiKey: string; stripe?: never; options?: StripeProviderOptions } | { apiKey?: never; stripe: StripeProps | null; options?: StripeProviderOptions; }; + type StripeProviderProps = { apiKey: string; stripe?: never; } & StripeProviderOptions | { apiKey?: never; stripe: StripeProps | null; } & StripeProviderOptions; interface StripeProps { createSource(sourceData?: SourceOptions): Promise; diff --git a/types/react-stripe-elements/react-stripe-elements-tests.tsx b/types/react-stripe-elements/react-stripe-elements-tests.tsx index 575987a1d9..ef1af5fa86 100644 --- a/types/react-stripe-elements/react-stripe-elements-tests.tsx +++ b/types/react-stripe-elements/react-stripe-elements-tests.tsx @@ -197,6 +197,7 @@ const TestStripeProviderProps3: React.SFC<{ }> = props => ; /** - * StripeProvider should be able to accept an `options` prop + * StripeProvider should be able to accept options. + * See: https://stripe.com/docs/stripe-js/reference#stripe-function for options. */ -const TestStripeProviderOptions: React.SFC = () => ; +const TestStripeProviderOptions: React.SFC = () => ;