Skip to content

Commit

Permalink
Update to newer version of Shiny
Browse files Browse the repository at this point in the history
  • Loading branch information
wch committed May 30, 2024
1 parent c644b93 commit 75ebe81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions srcts/src/components/_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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> = T extends undefined ? never : T;
Expand Down Expand Up @@ -87,8 +89,8 @@ function getAllFocusableChildren(el: HTMLElement): HTMLElement[] {
}

async function shinyRenderContent(
...args: Parameters<typeof window.Shiny.renderContentAsync>
): ReturnType<typeof window.Shiny.renderContentAsync> {
...args: Parameters<ShinyClass.renderContentAsync>

Check failure on line 92 in srcts/src/components/_utils.ts

View workflow job for this annotation

GitHub Actions / routine / routine

Cannot access 'ShinyClass.renderContentAsync' because 'ShinyClass' is a type, but not a namespace. Did you mean to retrieve the type of the property 'renderContentAsync' in 'ShinyClass' with 'ShinyClass["renderContentAsync"]'?
): Promise<void> {
if (!Shiny) {
throw new Error("This function must be called in a Shiny app.");
}
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 75ebe81

Please sign in to comment.