From b2d314bb65dbd081835112ab15696c59368d8d3d Mon Sep 17 00:00:00 2001 From: yamachu Date: Fri, 19 Aug 2022 03:07:40 +0900 Subject: [PATCH] exports dotnet and exit as named export --- src/mono/wasm/runtime/dotnet.d.ts | 4 +++- src/mono/wasm/runtime/export-types.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mono/wasm/runtime/dotnet.d.ts b/src/mono/wasm/runtime/dotnet.d.ts index 704b8ab94e230c..1479795e1f0304 100644 --- a/src/mono/wasm/runtime/dotnet.d.ts +++ b/src/mono/wasm/runtime/dotnet.d.ts @@ -269,6 +269,8 @@ declare global { function getDotnetRuntime(runtimeId: number): RuntimeAPI | undefined; } +declare const dotnet: ModuleAPI["dotnet"]; +declare const exit: ModuleAPI["exit"]; /** * Span class is JS wrapper for System.Span. This view doesn't own the memory, nor pin the underlying array. * It's ideal to be used on call from C# with the buffer pinned there or with unmanaged memory. @@ -315,4 +317,4 @@ declare class ManagedObject implements IDisposable { toString(): string; } -export { ArraySegment, AssetBehaviours, AssetEntry, CreateDotnetRuntimeType, DotnetModuleConfig, EmscriptenModule, IMemoryView, LoadingResource, ManagedError, ManagedObject, MemoryViewType, ModuleAPI, MonoConfig, NativePointer, ResourceRequest, RuntimeAPI, Span, createDotnetRuntime as default }; +export { ArraySegment, AssetBehaviours, AssetEntry, CreateDotnetRuntimeType, DotnetModuleConfig, EmscriptenModule, IMemoryView, LoadingResource, ManagedError, ManagedObject, MemoryViewType, ModuleAPI, MonoConfig, NativePointer, ResourceRequest, RuntimeAPI, Span, createDotnetRuntime as default, dotnet, exit }; diff --git a/src/mono/wasm/runtime/export-types.ts b/src/mono/wasm/runtime/export-types.ts index bc368975c17520..800b0a617e7665 100644 --- a/src/mono/wasm/runtime/export-types.ts +++ b/src/mono/wasm/runtime/export-types.ts @@ -17,6 +17,8 @@ declare global { export default createDotnetRuntime; +declare const dotnet: ModuleAPI["dotnet"]; +declare const exit: ModuleAPI["exit"]; /** * Span class is JS wrapper for System.Span. This view doesn't own the memory, nor pin the underlying array. @@ -71,6 +73,7 @@ export { EmscriptenModule, NativePointer, RuntimeAPI, ModuleAPI, DotnetModuleConfig, CreateDotnetRuntimeType, MonoConfig, AssetEntry, ResourceRequest, LoadingResource, AssetBehaviours, - IMemoryView, MemoryViewType, ManagedObject, ManagedError, Span, ArraySegment + IMemoryView, MemoryViewType, ManagedObject, ManagedError, Span, ArraySegment, + dotnet, exit };