https://pulumi.com logo
#typescript
Title
# typescript
a

ambitious-ram-5811

01/13/2020, 10:50 PM
Try
import * as URL from 'url'
h

handsome-truck-95168

01/13/2020, 10:50 PM
That did it! Thank you!
Hmm I must have been high,
import { URL } from "url"
now also works.
a

ambitious-ram-5811

01/13/2020, 10:52 PM
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

handsome-truck-95168

01/13/2020, 10:54 PM
does that depend on node version?
url.d.ts
exports a number of interfaces & functions.
a

ambitious-ram-5811

01/13/2020, 10:56 PM
Yeah, so those files are just describing what node actually does
it isn't directly tied to
url
h

handsome-truck-95168

01/14/2020, 12:03 AM
i c, thank you