Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
num(value: number | string): Value {
if (typeof value === "number") {
return Num.from(value);
} else if (typeof value === "string") {
return Num.from(+value);
} else {
throw new TypeError("" + value);
}
}
num(value: number | string): Value {
if (typeof value === "number") {
return Num.from(value);
} else if (typeof value === "string") {
return Num.from(+value);
} else {
throw new TypeError("" + value);
}
}