In Blazor, Core 7, I don't know how to create a JSImport signature to match an async javascript method. Here's an example of the Javascript method:
export async function DoSomething(data)
{
// do work
return result
}
the following C# signature doesn't compile because of the async and Task
// assume ImportAsync has already been called
[JSImport("DoSomething", "MyModule/DoSomething.js")]
internal static async partial Task<byte[]> DoSomething(byte[] data);
The microsoft literature was no help and there's no async examples here: https://github.com/pavelsavara/dotnet-wasm-todo-mvc
Am I supposed to use a callback? That would seem rather primitive and destroys the async model