Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function encodeValtype(v) {
var byte = constants.valtypesByString[v];
if (typeof byte === "undefined") {
throw new Error("Unknown valtype: " + v);
}
return parseInt(byte, 10);
}
export function encodeMutability(v) {
export function encodeValtype(v: Valtype): Byte {
const byte = constants.valtypesByString[v];
if (typeof byte === "undefined") {
throw new Error("Unknown valtype: " + v);
}
return parseInt(byte, 10);
}
export function encodeValtype(v) {
var byte = constants.valtypesByString[v];
if (typeof byte === "undefined") {
throw new Error("Unknown valtype: " + v);
}
return parseInt(byte, 10);
}
export function encodeMutability(v) {