diff --git a/src/mono/browser/runtime/dotnet.d.ts b/src/mono/browser/runtime/dotnet.d.ts index 2b99018f6f2897..85ed12291c531a 100644 --- a/src/mono/browser/runtime/dotnet.d.ts +++ b/src/mono/browser/runtime/dotnet.d.ts @@ -363,55 +363,6 @@ interface LoadingResource { url: string; response: Promise; } -interface AssetEntry { - /** - * the name of the asset, including extension. - */ - name: string; - /** - * determines how the asset will be handled once loaded - */ - behavior: AssetBehaviors; - /** - * this should be absolute url to the asset - */ - resolvedUrl?: string; - /** - * the integrity hash of the asset (if any) - */ - hash?: string | null | ""; - /** - * If specified, overrides the path of the asset in the virtual filesystem and similar data structures once downloaded. - */ - virtualPath?: string; - /** - * Culture code - */ - culture?: string; - /** - * If true, an attempt will be made to load the asset from each location in MonoConfig.remoteSources. - */ - loadRemote?: boolean; - /** - * If true, the runtime startup would not fail if the asset download was not successful. - */ - isOptional?: boolean; - /** - * If provided, runtime doesn't have to fetch the data. - * Runtime would set the buffer to null after instantiation to free the memory. - */ - buffer?: ArrayBuffer | Promise; - /** - * If provided, runtime doesn't have to import it's JavaScript modules. - * This will not work for multi-threaded runtime. - */ - moduleExports?: any | Promise; - /** - * It's metadata + fetch-like Promise - * If provided, the runtime doesn't have to initiate the download. It would just await the response. - */ - pendingDownload?: LoadingResource; -} type SingleAssetBehaviors = /** * The binary of the .NET runtime. @@ -785,4 +736,4 @@ declare global { declare const createDotnetRuntime: CreateDotnetRuntimeType; export { GlobalizationMode, createDotnetRuntime as default, dotnet, exit }; -export type { AssemblyAsset, Asset, AssetBehaviors, AssetEntry, Assets, BootModule, CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, EmscriptenModule, IMemoryView, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, ModuleAPI, MonoConfig, PdbAsset, ResourceExtensions, ResourceList, RuntimeAPI, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType }; +export type { AssemblyAsset, Asset, AssetBehaviors, Assets, BootModule, CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, EmscriptenModule, IMemoryView, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, ModuleAPI, MonoConfig, PdbAsset, ResourceExtensions, ResourceList, RuntimeAPI, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType }; diff --git a/src/mono/browser/runtime/types/export-types.ts b/src/mono/browser/runtime/types/export-types.ts index 1290802232c161..2c1442c72d1863 100644 --- a/src/mono/browser/runtime/types/export-types.ts +++ b/src/mono/browser/runtime/types/export-types.ts @@ -2,7 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. import type { IMemoryView } from "../marshal"; -import type { CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, RuntimeAPI, MonoConfig, ModuleAPI, Assets, Asset, AssetEntry, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType } from "."; +import type { CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, RuntimeAPI, MonoConfig, ModuleAPI, Assets, Asset, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType } from "."; import type { EmscriptenModule } from "./emscripten"; import type { dotnet, exit } from "../loader/index"; @@ -21,6 +21,6 @@ export default createDotnetRuntime; export { EmscriptenModule, - RuntimeAPI, ModuleAPI, DotnetHostBuilder, DotnetModuleConfig, CreateDotnetRuntimeType, MonoConfig, IMemoryView, Assets, Asset, AssetEntry, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType, + RuntimeAPI, ModuleAPI, DotnetHostBuilder, DotnetModuleConfig, CreateDotnetRuntimeType, MonoConfig, IMemoryView, Assets, Asset, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType, dotnet, exit }; diff --git a/src/native/libs/Common/JavaScript/loader/dotnet.d.ts b/src/native/libs/Common/JavaScript/loader/dotnet.d.ts index 9a35505c45e638..43637d44c19159 100644 --- a/src/native/libs/Common/JavaScript/loader/dotnet.d.ts +++ b/src/native/libs/Common/JavaScript/loader/dotnet.d.ts @@ -340,51 +340,6 @@ interface LoadingResource { url: string; response: Promise; } -interface AssetEntry { - /** - * the name of the asset, including extension. - */ - name: string; - /** - * determines how the asset will be handled once loaded - */ - behavior: AssetBehaviors; - /** - * this should be absolute url to the asset - */ - resolvedUrl?: string; - /** - * the integrity hash of the asset (if any) - */ - hash?: string | null | ""; - /** - * If specified, overrides the path of the asset in the virtual filesystem and similar data structures once downloaded. - */ - virtualPath?: string; - /** - * Culture code - */ - culture?: string; - /** - * If true, the runtime startup would not fail if the asset download was not successful. - */ - isOptional?: boolean; - /** - * If provided, runtime doesn't have to fetch the data. - * Runtime would set the buffer to null after instantiation to free the memory. - */ - buffer?: ArrayBuffer | Promise; - /** - * If provided, runtime doesn't have to import it's JavaScript modules. - * This will not work for multi-threaded runtime. - */ - moduleExports?: any | Promise; - /** - * It's metadata + fetch-like Promise - * If provided, the runtime doesn't have to initiate the download. It would just await the response. - */ - pendingDownload?: LoadingResource; -} type SingleAssetBehaviors = /** * The binary of the .NET runtime. @@ -754,4 +709,4 @@ declare global { } export { GlobalizationMode, createDotnetRuntime as default, dotnet, exit }; -export type { AssemblyAsset, Asset, AssetBehaviors, AssetEntry, Assets, BootModule, CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, EmscriptenModule, IMemoryView, IcuAsset, JsAsset, LoadBootResourceCallback, LoaderConfig, LoadingResource, ModuleAPI, PdbAsset, ResourceExtensions, ResourceList, RuntimeAPI, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType }; +export type { AssemblyAsset, Asset, AssetBehaviors, Assets, BootModule, CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, EmscriptenModule, IMemoryView, IcuAsset, JsAsset, LoadBootResourceCallback, LoaderConfig, LoadingResource, ModuleAPI, PdbAsset, ResourceExtensions, ResourceList, RuntimeAPI, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType }; diff --git a/src/native/libs/Common/JavaScript/types/export-api.ts b/src/native/libs/Common/JavaScript/types/export-api.ts index 7fbb2649a3f34d..05356a172ba2f6 100644 --- a/src/native/libs/Common/JavaScript/types/export-api.ts +++ b/src/native/libs/Common/JavaScript/types/export-api.ts @@ -1,7 +1,7 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. -import type { CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, ModuleAPI, LoaderConfig, IMemoryView, Assets, Asset, AssetEntry, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, RuntimeAPI, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType, dotnet, exit } from "./public-api"; +import type { CreateDotnetRuntimeType, DotnetHostBuilder, DotnetModuleConfig, ModuleAPI, LoaderConfig, IMemoryView, Assets, Asset, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, RuntimeAPI, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType, dotnet, exit } from "./public-api"; import type { EmscriptenModule } from "./emscripten"; declare const createDotnetRuntime: CreateDotnetRuntimeType; @@ -14,6 +14,6 @@ export default createDotnetRuntime; export { EmscriptenModule, - RuntimeAPI, ModuleAPI, DotnetHostBuilder, DotnetModuleConfig, CreateDotnetRuntimeType, LoaderConfig, IMemoryView, Assets, Asset, AssetEntry, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType, + RuntimeAPI, ModuleAPI, DotnetHostBuilder, DotnetModuleConfig, CreateDotnetRuntimeType, LoaderConfig, IMemoryView, Assets, Asset, AssemblyAsset, AssetBehaviors, BootModule, GlobalizationMode, IcuAsset, JsAsset, LoadBootResourceCallback, LoadingResource, PdbAsset, ResourceExtensions, ResourceList, SymbolsAsset, VfsAsset, WasmAsset, WebAssemblyBootResourceType, dotnet, exit };