TypeScriptBasic checks: sign, zero, empty, nullDifficulty 1/3
export function parseAmount(input: string): number {
const amount = Number(input);
if (amount <= 0) {
throw new Error("Amount must be positive");
}
return amount;
}