Solución
solution.tsTypeScript
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE';
type ApiPath = `${Uppercase<HttpMethod>}:/${string}`
export function buildApiPath(method: HttpMethod, resource: string): ApiPath {
// Construye y retorna la ruta con el formato "METHOD:/resource"
return `${method}:/${resource}`;
}0respuestas