News for hackers. Stuff that matters.
Re:No one cares about Bun's speed. Your CI does though by seniorsassycat on Sunday March 05, 2023 @06:56PM (#35035623)
How do bun, deno, and other typescript-built-in languages keep up with language features?
Re:No one cares about Bun's speed. Your CI does though by yonifei on Sunday March 05, 2023 @07:18PM (#35035830)
typescript(tsc) is the only one that does type checking.

bun, deno, esbuild, swc etc. can parse the syntax, but they chuck the TS (they probably don't even add it to the AST, but I haven't checked).

Keeping up with syntax is very doable. It doesn't change often, and updating the parser when it does isn't much work.

There are some past/ongoing projects[1][2] to create type checkers faster than tsc, but they aren't going to reach full parity and probably don't plan on keeping up with language features.

[1] https://github.com/dudykr/stc [2] https://github.com/marcj/TypeRunner

Re:No one cares about Bun's speed. Your CI does though by seniorsassycat on Sunday March 05, 2023 @09:33PM (#35036854)
So tsc runs on bun and deno? Do they implement any node apis used by typescript? I guess there's very little surface area - process, fs, maybe stream, event, and worker_threads or process?
Re:No one cares about Bun's speed. Your CI does though by andyferris on Sunday March 05, 2023 @07:10PM (#35035754)
I believe each version of Deno ships a single version of TypeScript.