HackerTrans
TopNewTrendsCommentsPastAskShowJobs

typescriptfan

no profile record

comments

typescriptfan
·4 tahun yang lalu·discuss
[flagged]
typescriptfan
·4 tahun yang lalu·discuss
> It's a framework, with all the usual framework downsides

> For example, a new package you install can require a new TypesScript version. Once installed, you then may need to update your source code. This can place quite a high tax on the developer, where perhaps a 10 minute change becomes hours long.

No. It's a language compiler. You can upgrade it safely without changing a single line in your codebase. If there is a breaking change (sometimes, regarding the strictness) there's also a configuration option that lets you keep the previous behavior.

> ii) Libraries are badly documented

And so you're going to lose any and all typing as your solution? I don't understand. Undocumented but typed >>> undocumented and untyped.

> iii) Error messages are hard to follow

I disagree completely, TypeScript has helped me many times to understand what's happening and why - I mean errors that I wasn't aware of in my previously untyped JS codebase.

> iv) It requires yet more transpilation

> Transpilation takes time, and always adds a burden to developers.

Doesn't matter. Use SWC or esbuild for sub-100ms compilation times. Your CI is a long running job due to tests and lint anyways. Nobody is writing pure uncompiled JS these days - you can't use NPM libraries that way, so there's always some (Web)pack step. I haven't seen a single developer who liked having to care about browser versions and wants to go back to that - but if you add a compilation step you get that for free and can write the latest and greatest.