3 ms·
Apparently this is invalid TypeScript (cannot parse it says): try { const parsedURL = new URL(url) requestPath = parsedURL.pathname } catch (error:
by wdb 6y ago
Apparently this is invalid TypeScript (cannot parse it says):
try {
const parsedURL = new URL(url)
requestPath = parsedURL.pathname
} catch (error: unknown) {
// NOOP
}
It's complaining about : unknown bit which one of the newer typescript eslint rules enforces.
- Spivak 6y agoApparently import random if random.randint(0,1) == 2: print(“hello”) Is also unparseable.
- mdaniel 6y agois that due to the smartquotes, or that's just an artifact of your HN comment? Perhaps a more pointed set of questions: what is the error it emits, and have you considered submitting that case as an actual bug?