TypeScript
Decision
We write all of our code in TypeScript.
Problems
We need to choose at least one programming language to write in.
Context
Currently, almost everything in our codebase is written in plain JavaScript. Our developers all know JavaScript, and most know TypeScript.
Options
- Plain JavaScript
- TypeScript
- Other language
- Multiple languages
Reasoning
TypeScript prevents on average 15% of bugs, potentially even more with strict typing over plain JavaScript. It can be used across frontend and backend which makes code more reusable and allows developers to switch more easily between frontend and backend coding.
At the moment, we do not have problems that require more performance-oriented programming languages like Go or Rust. We do not have a big enough team to support multiple languages without risking stability if team members change.
Also, JavaScript is currently one of the easier languages to hire for, with TypeScript being not too hard to learn when coming from JavaScript.
Consequences
We will need to rewrite most of our codebase in TypeScript. We need to contend with less performance than more specialized languages.