DEV Community

Discussion on: Forget NodeJS! Build native TypeScript applications with Deno 🦖

Collapse
 
artoodeeto profile image
aRtoo

Been waiting for deno they said production on version 1 will be ready last january. hehe. just excited for this. anyway I have question about a npm package that is built purely in typescript. Can deno still used it as a library? thanks.

Collapse
 
deepu105 profile image
Deepu K Sasidharan • Edited

Well its Open source and as an open source maintainer I know first hand how schedules go. People are doing it on their free time so nothing is guaranteed.

It doesn't matter if a package is built in TS or JS, what matters is how the module is bundled. If its bundled as an ES module then it should work like the Lodash package I showed in sample. Also Deno is building a node compatibility module to support non ES npm modules

Collapse
 
artoodeeto profile image
aRtoo

ohh. Its easy to migrate then by just changing tscofig. Thank you sir.

Anyway I watch the talk given by ryan dahl he said that "no, nodejs wont be compatible with deno" if he changed his mind this would be awesome. I can still use express.

Thread Thread
 
pratyushcrd profile image
Pratyush

I don't think its as easy as changing minds. NodeJs and Deno are built upon different architecture. The core module would be different and thus incompatible. Also, deno is supposed to use a different event-loop, with different kinds of stuff. Compatibility should be an issue here.

Thread Thread
 
deepu105 profile image
Deepu K Sasidharan

I don't think there is an issue with event loops, underneath its still V8 engine. The real issue is compatibility with existing nodeJS modules

Thread Thread
 
pratyushcrd profile image
Pratyush

Yup compatibility with node modules would be the issue. I was talking about event loops because the methods dependent on event loop in node might not be same as deno (of which I am not sure of) like process.nextTick or setImmediate. In that case compatibility might be issue. Basically if any underlying core packages change their API or its working its an compatibility issue.