Solución
solution.tsTypeScript
// Definí un type alias OrderStatus con los posibles estados del pedido
// Los estados son: "pending", "processing", "shipped", "delivered", "cancelled"
type OrderStatus = "pending"| "processing"| "shipped"| "delivered"| "cancelled"
export function getOrderStatus(id: number): string {
let status: OrderStatus = "pending"
return id % 2 === 0 ? status = 'delivered' : status
}0respuestas