News for hackers. Stuff that matters.
Re:Deno 1.0 by _bxg1 on Wednesday May 13, 2020 @07:51PM (#23173297)
So it's an alternative to Node? Sounds incredibly cool, honestly. This:

> Supports TypeScript out of the box.

Seems like a small thing, but it has me interested all on its own. It's a huge pain to set up a whole build process just for TypeScript (which is generally the only preprocessing you need outside of the browser).

Re:Deno 1.0 by gunn on Wednesday May 13, 2020 @08:04PM (#23173415)
You'll like https://www.npmjs.com/package/ts-node - it allows zero processing use of typescript
Re:Deno 1.0 by bgdam on Wednesday May 13, 2020 @09:08PM (#23173957)
Word of warning though - ts-node can be excruciatingly slow. We recently switched a project from using ts-node in our dev environment to compiling with tsc and running with node, and shaved around 5 minutes from our startup time.
Re:Deno 1.0 by lioeters on Wednesday May 13, 2020 @10:59PM (#23174790)
Well, that answers something I was wondering about recently.

I noticed in a couple of popular TypeScript (+React fullstack) boilerplates, that they were using ts-node to run the server in production.

Unlike babel-node, there's no mention in the documentation to avoid using it in production - but I figured there'd be performance impact, since it's transpiling on the fly (I suppose just once per require).

Re:Deno 1.0 by dgellow on Thursday May 14, 2020 @02:50AM (#23176240)
You had 5 minutes startup time?!
Re:Deno 1.0 by z3t4 on Thursday May 14, 2020 @03:46PM (#23184420)
More then one second and people will test their code less often. Five minutes and people start relying on the type-checker. Like with the chicken and egg problem, what came first, the type-checker or the need to have a type checker?
Re:Deno 1.0 by desert_boi on Wednesday May 13, 2020 @08:17PM (#23173517)
Zero processing is a little generous, for things like like ES Module support (and interop), ts-node can be a struggle to get going.
Re:Deno 1.0 by gunn on Wednesday May 13, 2020 @08:42PM (#23173756)
As in .mjs files? Personally, I just want to import my own .js / .ts files and external npm packages which works well - https://github.com/gunn/covid-19-scripts/blob/023579e1cf/get...

The catch for me is that it's probably not suitable for a sever in production as mentioned elsewhere in this thread.

Re:Deno 1.0 by torb-xyz on Thursday May 14, 2020 @04:43AM (#23177037)
It doesn't really help that much with TypeScript native NPM-packages being published with JS and D.TS (TypeScript-definitions) instead of the original source, does it?)
Re:Deno 1.0 by mrkurt on Wednesday May 13, 2020 @08:03PM (#23173411)
Yes it's great! My deno projects are really simple directories, `deno run server.ts` is nice and tidy.