diff --git a/web/packages/core/src/load-ruffle.ts b/web/packages/core/src/load-ruffle.ts index 50c12b23b..67e454c3b 100644 --- a/web/packages/core/src/load-ruffle.ts +++ b/web/packages/core/src/load-ruffle.ts @@ -11,7 +11,7 @@ import { } from "wasm-feature-detect"; import { setPolyfillsOnLoad } from "./js-polyfills"; import { publicPath } from "./public-path"; -import type { DataLoadOptions, URLLoadOptions } from "./load-options"; +import { BaseLoadOptions } from "./load-options"; declare global { let __webpack_public_path__: string; @@ -32,7 +32,7 @@ type ProgressCallback = (bytesLoaded: number, bytesTotal: number) => void; * instances. */ async function fetchRuffle( - config: URLLoadOptions | DataLoadOptions | object, + config: BaseLoadOptions, progressCallback?: ProgressCallback, ): Promise { // Apply some pure JavaScript polyfills to prevent conflicts with external @@ -128,7 +128,7 @@ let lastLoaded: Promise | null = null; * instances. */ export function loadRuffle( - config: URLLoadOptions | DataLoadOptions | object, + config: BaseLoadOptions, progressCallback?: ProgressCallback, ): Promise { if (lastLoaded === null) { diff --git a/web/packages/core/src/public-path.ts b/web/packages/core/src/public-path.ts index 745c737ae..a546cd90b 100644 --- a/web/packages/core/src/public-path.ts +++ b/web/packages/core/src/public-path.ts @@ -1,4 +1,4 @@ -import type { DataLoadOptions, URLLoadOptions } from "./load-options"; +import { BaseLoadOptions } from "./load-options"; import { currentScriptURL, isExtension } from "./current-script"; /** @@ -18,9 +18,7 @@ import { currentScriptURL, isExtension } from "./current-script"; * @param config The `window.RufflePlayer.config` object. * @returns The public path for the given source. */ -export function publicPath( - config: URLLoadOptions | DataLoadOptions | object, -): string { +export function publicPath(config: BaseLoadOptions): string { // Default to the directory where this script resides. let path = currentScriptURL?.href ?? ""; if (