Closed
Description
Using e.g. Uint8Array.wrap(buffer)
is valid code in AssemblyScript but doesn't work in regular TypeScript, so it isn't portable. As far as I can tell there needs to be a corresponding implementation in std/portable/index.js
.
The following code snippet works for me:
Object.defineProperty(Uint8Array, "wrap", {
value: function(buffer, byteOffset, length) {
return new Uint8Array(buffer, byteOffset, length);
}
});
Am I overlooking something or should I submit a pull request?
P.S. Thank you so much for this library!