Skip to content

Commit 7dbd23a

Browse files
authored
🤖 Merge PR DefinitelyTyped#71519 [gsi] Fix types for renderbutton by @cprecioso
1 parent bf3d8cb commit 7dbd23a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

types/gsi/gsi-tests.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ google.accounts.id.prompt(notification => {
4141
/**
4242
* @see https://developers.google.com/identity/gsi/web/reference/js-reference#google.accounts.id.renderButton
4343
*/
44-
google.accounts.id.renderButton("#parent-element", { type: "standard" });
44+
google.accounts.id.renderButton(document.getElementById("#parent-element")!, { type: "standard" });
4545

4646
/**
4747
* @see https://developers.google.com/identity/gsi/web/reference/js-reference#google.accounts.id.disableAutoSelect

types/gsi/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ declare namespace google.accounts.id {
175175
* @param parent The parent element onto which to mount the Sign In With Google button.
176176
* @param options Button configuration options.
177177
*/
178-
function renderButton(parent: string, options: GsiButtonConfiguration): void;
178+
function renderButton(parent: HTMLElement, options: GsiButtonConfiguration): void;
179179

180180
/**
181181
* 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.

0 commit comments

Comments
 (0)