From d080b3fd445921d1a1b51090c13caa1b485ea975 Mon Sep 17 00:00:00 2001 From: Thomas Chia Date: Sat, 2 Jun 2018 12:01:59 +0800 Subject: [PATCH] Options are spread into props. --- types/react-stripe-elements/index.d.ts | 2 +- types/react-stripe-elements/react-stripe-elements-tests.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) 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 = () => ;