Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 1 addition & 50 deletions src/mono/browser/runtime/dotnet.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,55 +363,6 @@ interface LoadingResource {
url: string;
response: Promise<Response>;
}
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<ArrayBuffer>;
/**
* If provided, runtime doesn't have to import it's JavaScript modules.
* This will not work for multi-threaded runtime.
*/
moduleExports?: any | Promise<any>;
/**
* It's metadata + fetch-like Promise<Response>
* 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.
Expand Down Expand Up @@ -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 };
4 changes: 2 additions & 2 deletions src/mono/browser/runtime/types/export-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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
};
47 changes: 1 addition & 46 deletions src/native/libs/Common/JavaScript/loader/dotnet.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,51 +340,6 @@ interface LoadingResource {
url: string;
response: Promise<Response>;
}
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<ArrayBuffer>;
/**
* If provided, runtime doesn't have to import it's JavaScript modules.
* This will not work for multi-threaded runtime.
*/
moduleExports?: any | Promise<any>;
/**
* It's metadata + fetch-like Promise<Response>
* 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.
Expand Down Expand Up @@ -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 };
4 changes: 2 additions & 2 deletions src/native/libs/Common/JavaScript/types/export-api.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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
};
Loading