Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This does seem like a dangerous side-path unrelated to the Deno project's needs.

From the description, it doesn't sound like Deno needs the type information for V8 optimizations (I thought they had explored that, but I don't recall, and the description here is unclear), so maybe switching to more of a two pass system of a simple as possible "type stripper" (like Babel's perhaps?) and leave tsc compilation for type checking as a separate background process. Maybe behind some sort of "production mode" flag so that type errors stop debug runs but in production assume you can strip types without waiting for a full compile?

Maybe even writing a type stripper in Rust isn't a bad idea, but definitely trying to capture all of tsc's functionality in Rust seems like a fool's errand.



Typescript already has transpile-only mode that lets it run without performing those checks and just emit.

I use it with ts-node all the time for my docker images that require fast startup.

node -r ts-node/register/transpile-only xyz.ts




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: