Estoy creando un servidor de nodos, pero hay una función obsoleta. Tengo el siguiente error en mi código:
The signature '(urlString: string): UrlWithStringQuery' of 'parse' is deprecated.ts(6387) url.d.ts(63, 8): The declaration was marked as deprecated here. (alias) parse(urlString: string): UrlWithStringQuery (+3 overloads) import parse The url.parse() method takes a URL string, parses it, and returns a URL object. A TypeError is thrown if urlString is not a string.mi código es:
server.on('request', function (req, res) { var filename = parse(req.url).pathname, fullPath, extension; ...¿Qué puedo usar en lugar de parse(req.url).pathname?