News for hackers. Stuff that matters.
Re:Tips for Performant TypeScript by ragnese on Wednesday November 25, 2020 @02:59PM (#25213589)
I find the mentality around TypeScript to be bizarre.

"It's just a type checker for JavaScript" - not really. It's a language that transpiles to JavaScript and it happens to be a superset of JavaScript (namespaces and enums, anyone?).

But saying that it's just a layer on top of JavaScript sounds like saying C++ is just a layer on top of C.

Re:Tips for Performant TypeScript by the_af on Wednesday November 25, 2020 @04:59PM (#25214757)
> C++ is just a layer on top of C

C++ used to be just a layer on top of C, but not anymore. If it still was, it wouldn't be a bad thing to say.

Type checks that run during compilation/transpilation/typechecking do not "run" as the code is executed. This is what happens with Typescript, and that's what the original commenter was saying.