READ RELATED: TypeScript and the Power of a Statically-Typed Language
“But in my experience, that’s not an actual problem,” Pierno said. “Not once have I had a production system go down because of a TypeScript problem. TypeScript is two times the work to solve a problem I’ve never seen nor had. TypeScript offers the comfort of a strongly typed language for people coming from other programming languages. You can bolt it on to most applications and introduce it piece-meal in the most critical parts of the application.”
“My suspicion is that making a move like that on an existing codebase for security reasons is rarely worth it, unless you suddenly get a new development team who has a lot of expertise in the new language and hates the old,” Ansari added. “Most organizations are better off fully understanding the security tradeoffs their languages, toolsets, and technologies provide and make design and implementation decisions based on those factors. better for its needs (and why)?”
Despite Ansari’s case for staying with whatever you are using now, Carl Saunders, co-founder and full stack developer for Raven Code Limited, argues that TypeScript is the clear winner in this debate.
With TypeScript, a developer can easily write clean and maintainable code, allowing them to concentrate on writing the feature, Saunders said. Another benefit of TypeScript is a developer can adopt early ECMAScript specification proposals before they are publicly available, and behind the scenes, TypeScript will polyfill those features.
“TypeScript can also be used as a command line interface (CLI),” Saunders added. “This means a developer can run it as part of the developer workflow and within a background task. More importantly, it can be executed as part of the continuous integration (CI) build pipeline. This allows errors to be caught even before the code is ever deployed to users.”
If starting from scratch, you’ll want to read through the discussion above, experiment a little, and see which appears to be a better fit for your organization.