Skip to content

Commit

Permalink
add options param to getElement for address element
Browse files Browse the repository at this point in the history
  • Loading branch information
maxwelly-stripe committed Aug 9, 2024
1 parent 2931201 commit 3648378
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 5 additions & 1 deletion types/stripe-js/elements-group.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
StripeIssuingCardCopyButtonElementOptions,
StripeExpressCheckoutElement,
StripeExpressCheckoutElementOptions,
StripeAddressElementGetElementOptions,
} from './elements';
import {StripeError} from './stripe';

Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions types/stripe-js/elements/address.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,7 @@ export interface StripeAddressElementChangeEvent {
phone?: string;
};
}

export interface StripeAddressElementGetElementOptions {
mode: AddressMode;
}

0 comments on commit 3648378

Please sign in to comment.