Describe the change
Have anyone considered migrating the codebase to TypeScript?
The benefits would be:
Strong Typing: TypeScript allows you to catch type-related errors early during development, improving code reliability and maintainability. It provides enhanced code navigation, autocompletion, and refactoring support in modern IDEs.
Improved Maintainability: TypeScript enforces the use of explicit types, making the code easier to understand and maintain. It provides better documentation for the codebase, making it more readable for developers who work on it in the future. It also encourages better code organization and modularity.
ECMAScript Compatibility: TypeScript is a superset of JavaScript, so we can gradually introduce TypeScript the project without having to rewrite everything.
To play devils advocate here, cons are:
Contributors knowledge: Not all contributors might know TypeScript well enough or at all.
My response to that is:
if they develop new feature they can always create .js files.
If they want to contribute in a file that exist already and is in .ts and having problems with TS, they can disable it with // @ts-ignore
Compilation Overhead: TypeScript code needs to be transpiled into JavaScript before it can be executed in the browser or on the server. This adds an extra step to the development workflow and introduces a compilation overhead. This will affect the deployment and dev build.
Adoption and Compatibility: While TypeScript has gained widespread adoption, there might still be some existing libraries, tools, or frameworks that have limited or no TypeScript support. Although TypeScript can work with JavaScript code seamlessly, you might miss out on some of the benefits of static typing when interacting with untyped JavaScript code.
If you deem the migration valuable I'm willing to help, by regularly opening PR's of moderate size with the migration of couple components. I also can support other contributors if they have problems with TS in their PR's.
Describe the change Have anyone considered migrating the codebase to TypeScript? The benefits would be:
Strong Typing: TypeScript allows you to catch type-related errors early during development, improving code reliability and maintainability. It provides enhanced code navigation, autocompletion, and refactoring support in modern IDEs.
Improved Maintainability: TypeScript enforces the use of explicit types, making the code easier to understand and maintain. It provides better documentation for the codebase, making it more readable for developers who work on it in the future. It also encourages better code organization and modularity.
ECMAScript Compatibility: TypeScript is a superset of JavaScript, so we can gradually introduce TypeScript the project without having to rewrite everything.
To play devils advocate here, cons are:
Contributors knowledge: Not all contributors might know TypeScript well enough or at all. My response to that is:
.js
files..ts
and having problems with TS, they can disable it with// @ts-ignore
Compilation Overhead: TypeScript code needs to be transpiled into JavaScript before it can be executed in the browser or on the server. This adds an extra step to the development workflow and introduces a compilation overhead. This will affect the deployment and dev build.
Adoption and Compatibility: While TypeScript has gained widespread adoption, there might still be some existing libraries, tools, or frameworks that have limited or no TypeScript support. Although TypeScript can work with JavaScript code seamlessly, you might miss out on some of the benefits of static typing when interacting with untyped JavaScript code.
If you deem the migration valuable I'm willing to help, by regularly opening PR's of moderate size with the migration of couple components. I also can support other contributors if they have problems with TS in their PR's.