Skip to content

default

ts
default: object;

Type declaration

boot()

ts
boot: (options?) => Promise<RuntimeAPI>;

Initializes .NET runtime and binds C# APIs.

Parameters

options?: BootOptions

Specify to configure the boot process.

Returns

Promise<RuntimeAPI>

Promise that resolves into .NET runtime instance.

BootStatus

ts
BootStatus: typeof BootStatus;

dotnet

ts
dotnet: object;

.NET internal modules and associated utilities.

dotnet.buildConfig()

ts
buildConfig: (resources, root?) => Promise<RuntimeConfig>;

Builds .NET runtime configuration.

Parameters

resources: BootResources

Resources required for runtime initialization.

root?: string

When specified, assumes boot resources are side-loaded from the specified root.

Returns

Promise<RuntimeConfig>

dotnet.getMain()

ts
getMain: (root?) => Promise<ModuleAPI & object>;

Fetches main dotnet module (dotnet.js).

Parameters

root?: string

Returns

Promise<ModuleAPI & object>

dotnet.getNative()

ts
getNative: (root?) => Promise<unknown & object>;

Fetches dotnet native module (dotnet.native.js).

Parameters

root?: string

Returns

Promise<unknown & object>

dotnet.getRuntime()

ts
getRuntime: (root?) => Promise<unknown & object>;

Fetches dotnet runtime module (dotnet.runtime.js).

Parameters

root?: string

Returns

Promise<unknown & object>

exit()

ts
exit: (code?, reason?) => Promise<void>;

Terminates .NET runtime and removes WASM module from memory.

Parameters

code?: number

Exit code; will use 0 (normal exit) by default.

reason?: string

Exit reason description (optional).

Returns

Promise<void>

getStatus()

ts
getStatus: () => BootStatus;

Returns current runtime module lifecycle state.

Returns

BootStatus

resources

ts
resources: BootResources;

Defined in

index.ts:6 ↗