Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#71519 [gsi] Fix types for renderbutton by
Browse files Browse the repository at this point in the history
  • Loading branch information
cprecioso authored Dec 28, 2024
1 parent bf3d8cb commit 7dbd23a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion types/gsi/gsi-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ google.accounts.id.prompt(notification => {
/**
* @see https://developers.google.com/identity/gsi/web/reference/js-reference#google.accounts.id.renderButton
*/
google.accounts.id.renderButton("#parent-element", { type: "standard" });
google.accounts.id.renderButton(document.getElementById("#parent-element")!, { type: "standard" });

/**
* @see https://developers.google.com/identity/gsi/web/reference/js-reference#google.accounts.id.disableAutoSelect
Expand Down
2 changes: 1 addition & 1 deletion types/gsi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ declare namespace google.accounts.id {
* @param parent The parent element onto which to mount the Sign In With Google button.
* @param options Button configuration options.
*/
function renderButton(parent: string, options: GsiButtonConfiguration): void;
function renderButton(parent: HTMLElement, options: GsiButtonConfiguration): void;

/**
* When the user signs out of your website, you need to call the method google.accounts.id.disableAutoSelect to record the status in cookies. This prevents a UX dead loop.
Expand Down

0 comments on commit 7dbd23a

Please sign in to comment.