Solución
solution.tsTypeScript
export function formatValue(value: string | number): string | number {
// Usa typeof para distinguir string de number y actuar distinto en cada caso
if(typeof value === 'string') return value.toUpperCase()
if (typeof value === 'number') return value * 2
}0respuestas