I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?
Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
31–40 of 49 posts
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#32What I really like about this is that you open the dependency in a web browser and see the human readable source code. No transpiling! https://deno.land/std/http/server.ts
This is generally already possible with webpack, but many/most websites i've looked at have source maps turned off. Maybe the extra compile time is too much, or they just want to disincentivize client-side reverse engineering.
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#33Deno is such a nice little scripting tool. I've been using it for devops glue and scripts lately. Native typescript, easy-as-pie dependency management. its great!
Personally I do not like the fact that it puts too much trust into DNS. DNS wasn't created with security in mind, so to say Deno is secure because it uses a permissions system while relying directly into DNS for imports to me sounds weird.
But with deno, if you’ve just accidentally installed some malicious squatters’ package that mimics the one you meant to use, at least you’ve got less exposure because the malicious code won’t necessarily have blanket permissions to make network calls, read files, etc. virtually any other language/package management system cannot say the same.
deno will download and cache the dependencies you import, they’re right in the project folder vs buried in a sea of node_modules. It’s super convenient to look at and inspect, if there’s any doubt or idle curiosity.
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#34Earlier quoted context omitted.
TypeScript...
what, I'm just supposed to know that?
Just saying because TS had some kind of popularity these days.
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#35This is such a neat demo. I wrote up an annotated version of the code while I was figuring out exactly how it worked. https://til.simonwillison.net/deno/annotated-deno-deploy-dem...
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#36I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?
It always did. That’s been a core feature / benefit from day 1.
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#37I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?
It always did. That’s been a core feature / benefit from day 1.
> At a high level, Deno converts TypeScript (as well as TSX and JSX) into JavaScript. It does this via a combination of the TypeScript compiler, which we build into Deno, and a Rust library called swc. When the code has been type checked and transformed, it is stored in a cache, ready for the next run without the need to convert it from its source to JavaScript again.
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#38Has anyone written a comparison of Deno Deploy and Cloudflare Workers yet?
Deno: 28 datacenters Workers: 200+ datacenters
CloudFlare: global, huge company who regrets they don't already route 100% of internet traffic
Edit: I should add, I commend both efforts, both probably improve the world more than they hurt it, just injecting a bit of humor.
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#39Earlier quoted context omitted.
what, I'm just supposed to know that?
I think it's not unobvious if you open the link
I can see how you can get confused, even if I wasn't as I'm around the JS community.
Re: Deno Deploy Demo: a multi-datacenter chat, client+server in 23 lines of TS
#40I'm a bit confused when people say "native TypeScript" and "no transpiling" about Deno, does Deno now execute TypeScript without translating it to JavaScript first?
It always did. That’s been a core feature / benefit from day 1.
https://deno.land/manual@v1.15.3/typescript/overview#how-doe...