Currently we use the type ArrayBufferLike for Host.outputBytes. But this is too restrictive. It doesn't accept typed array buffers. Which means that the user needs to unwrap their buffer. Example:
var buffer = (new TextEncoder()).encode("Hello, World!").buffer
Host.outputBytes(buffer)
Ideally it could take typed and untyped buffers, but i'm not sure if typescript has a known type for this. We could create one like:
Currently we use the type ArrayBufferLike for
Host.outputBytes
. But this is too restrictive. It doesn't accept typed array buffers. Which means that the user needs to unwrap their buffer. Example:Ideally it could take typed and untyped buffers, but i'm not sure if typescript has a known type for this. We could create one like: