diff --git a/srcts/src/components/_utils.ts b/srcts/src/components/_utils.ts index 1150ec3c1..ef0ea71c8 100644 --- a/srcts/src/components/_utils.ts +++ b/srcts/src/components/_utils.ts @@ -2,8 +2,10 @@ import type { HtmlDep } from "rstudio-shiny/srcts/types/src/shiny/render"; import type { InputBinding as InputBindingType } from "rstudio-shiny/srcts/types/src/bindings/input"; +import type { ShinyClass } from "rstudio-shiny/srcts/types/src"; + // eslint-disable-next-line @typescript-eslint/naming-convention -const Shiny: typeof window.Shiny | undefined = window.Shiny; +const Shiny: ShinyClass | undefined = window.Shiny; // Exclude undefined from T type NotUndefined = T extends undefined ? never : T; @@ -87,8 +89,8 @@ function getAllFocusableChildren(el: HTMLElement): HTMLElement[] { } async function shinyRenderContent( - ...args: Parameters -): ReturnType { + ...args: Parameters +): Promise { if (!Shiny) { throw new Error("This function must be called in a Shiny app."); } diff --git a/yarn.lock b/yarn.lock index 8e383e881..62bddfa2e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -326,7 +326,7 @@ "@types/rstudio-shiny@https://github.com/rstudio/shiny#init-promise": version "1.8.1-alpha.9001" - resolved "https://github.com/rstudio/shiny#5ca2c80083fb85478ab47088f46aa8fd2466a945" + resolved "https://github.com/rstudio/shiny#83d9cae6cc45a86489f2d2d068e65a443ba57d53" dependencies: "@types/bootstrap" "3.4.0" "@types/bootstrap-datepicker" "0.0.14"