Open bdemann opened 3 weeks ago
Describe the bug The return type of IDL.encode is specified to be an ArrayBuffer but at run time it is actually a Uint8Array.
import { IDL } from "@dfinity/candid";
const result = IDL.encode([IDL.Text], ["hello"]);
console.log(result instanceof Uint8Array); // true console.log(result instanceof ArrayBuffer); // false console.log(result); // shows a Uint8Array
Describe the bug The return type of IDL.encode is specified to be an ArrayBuffer but at run time it is actually a Uint8Array.
const result = IDL.encode([IDL.Text], ["hello"]);
console.log(result instanceof Uint8Array); // true console.log(result instanceof ArrayBuffer); // false console.log(result); // shows a Uint8Array