Try `import * as URL from 'url'`
# typescript
a
Try
import * as URL from 'url'
h
That did it! Thank you!
Hmm I must have been high,
import { URL } from "url"
now also works.
a
The reason this is so Weird is that ES6 imports are slightly Different than old-style node imports
🤔 1
Some older modules don't export a module Object, but just literally a single Function
Like
url
h
does that depend on node version?
url.d.ts
exports a number of interfaces & functions.
a
Yeah, so those files are just describing what node actually does
it isn't directly tied to
url
h
i c, thank you