const toNumber = (str) => +str;
const toNumber = (str: string): number => +str;
toNumber('42'); // 42