diff --git a/types/gsi/gsi-tests.ts b/types/gsi/gsi-tests.ts index c9ffdcb3d082e6..25a12ddafaac6d 100644 --- a/types/gsi/gsi-tests.ts +++ b/types/gsi/gsi-tests.ts @@ -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 diff --git a/types/gsi/index.d.ts b/types/gsi/index.d.ts index 597e1beda93f72..ee69adb2902cfb 100644 --- a/types/gsi/index.d.ts +++ b/types/gsi/index.d.ts @@ -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.