Skip to content

Commit 2b9aacb

Browse files
exports dotnet and exit as named export (#74222)
Co-authored-by: yamachu <yamachu.dev@gmail.com>
1 parent 55594df commit 2b9aacb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/mono/wasm/runtime/dotnet.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,8 @@ declare global {
269269
function getDotnetRuntime(runtimeId: number): RuntimeAPI | undefined;
270270
}
271271

272+
declare const dotnet: ModuleAPI["dotnet"];
273+
declare const exit: ModuleAPI["exit"];
272274
/**
273275
* Span class is JS wrapper for System.Span<T>. This view doesn't own the memory, nor pin the underlying array.
274276
* 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 {
315317
toString(): string;
316318
}
317319

318-
export { ArraySegment, AssetBehaviours, AssetEntry, CreateDotnetRuntimeType, DotnetModuleConfig, EmscriptenModule, IMemoryView, LoadingResource, ManagedError, ManagedObject, MemoryViewType, ModuleAPI, MonoConfig, NativePointer, ResourceRequest, RuntimeAPI, Span, createDotnetRuntime as default };
320+
export { ArraySegment, AssetBehaviours, AssetEntry, CreateDotnetRuntimeType, DotnetModuleConfig, EmscriptenModule, IMemoryView, LoadingResource, ManagedError, ManagedObject, MemoryViewType, ModuleAPI, MonoConfig, NativePointer, ResourceRequest, RuntimeAPI, Span, createDotnetRuntime as default, dotnet, exit };

src/mono/wasm/runtime/export-types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ declare global {
1717

1818
export default createDotnetRuntime;
1919

20+
declare const dotnet: ModuleAPI["dotnet"];
21+
declare const exit: ModuleAPI["exit"];
2022

2123
/**
2224
* Span class is JS wrapper for System.Span<T>. This view doesn't own the memory, nor pin the underlying array.
@@ -71,6 +73,7 @@ export {
7173
EmscriptenModule, NativePointer,
7274
RuntimeAPI, ModuleAPI, DotnetModuleConfig, CreateDotnetRuntimeType, MonoConfig,
7375
AssetEntry, ResourceRequest, LoadingResource, AssetBehaviours,
74-
IMemoryView, MemoryViewType, ManagedObject, ManagedError, Span, ArraySegment
76+
IMemoryView, MemoryViewType, ManagedObject, ManagedError, Span, ArraySegment,
77+
dotnet, exit
7578
};
7679

0 commit comments

Comments
 (0)