From 36483781a12bcf8c169fd389cafb196ab4cf70f3 Mon Sep 17 00:00:00 2001 From: Maxwell Yang Date: Fri, 9 Aug 2024 14:30:44 -0700 Subject: [PATCH] add options param to getElement for address element --- types/stripe-js/elements-group.d.ts | 6 +++++- types/stripe-js/elements/address.d.ts | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/types/stripe-js/elements-group.d.ts b/types/stripe-js/elements-group.d.ts index 02dc71e3..ea7f8c19 100644 --- a/types/stripe-js/elements-group.d.ts +++ b/types/stripe-js/elements-group.d.ts @@ -47,6 +47,7 @@ import { StripeIssuingCardCopyButtonElementOptions, StripeExpressCheckoutElement, StripeExpressCheckoutElementOptions, + StripeAddressElementGetElementOptions, } from './elements'; import {StripeError} from './stripe'; @@ -84,7 +85,10 @@ export interface StripeElements { /** * Looks up a previously created `Element` by its type. */ - getElement(elementType: 'address'): StripeAddressElement | null; + getElement( + elementType: 'address', + options?: StripeAddressElementGetElementOptions + ): StripeAddressElement | null; ///////////////////////////// /// paymentMethodMessaging diff --git a/types/stripe-js/elements/address.d.ts b/types/stripe-js/elements/address.d.ts index 35ec366e..0001862a 100644 --- a/types/stripe-js/elements/address.d.ts +++ b/types/stripe-js/elements/address.d.ts @@ -259,3 +259,7 @@ export interface StripeAddressElementChangeEvent { phone?: string; }; } + +export interface StripeAddressElementGetElementOptions { + mode: AddressMode; +}