ExportedFunction

ExportedFunction

interface ExportedFunction

Represents a function exported by a WebAssembly module.

Fields

Name Description
abstract signature: String

String-representation of the function's arguments and result type.

abstract argCount: Int

Number of expected arguments.

Methods

invoke

abstract operator fun invoke(vararg args: Number): Number?

Invokes the exported WebAssembly function.

When called, the provided args will be compared against the required parameters of the exported WebAssembly function about to be executed. If the arguments don't match the requirements, an IllegalArgumentException will be thrown.

Returns null if the exported function has no result value.

Parameters

Name Description
vararg args: Number

ReturnValue

Name Description
Number?