Converts a Uint8Array to the specified type.
import { fromBytes } from "thirdweb/utils";const bytes = new Uint8Array([1, 164]);const number = fromBytes(bytes, "number");console.log(number); // 420
function fromBytes( bytes: Uint8Array<ArrayBufferLike>, toOrOpts: FromBytesParameters<TTo>,): FromBytesReturnType<TTo>;
The Uint8Array to convert.
let bytes: Uint8Array<ArrayBufferLike>;
The target type or conversion options.
let toOrOpts: FromBytesParameters<TTo>;
let returnType: FromBytesReturnType<TTo>;
The converted value of the specified type.