Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Unify Programming Languages to a Single Standard #1632

Open
elliot-huffman opened this issue May 7, 2024 · 1 comment
Open

Comments

@elliot-huffman
Copy link
Contributor

elliot-huffman commented May 7, 2024

Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it
There is no unified coding language across this project.

Describe the preferred solution
Convert all JS to TS.

Describe alternatives you've considered
Convert all TS to JS.

Additional context
A single unified language would reduce the maintenance complexity of the project (no more duplicated IDE configs for JS and TS files), ensure type consistency across all files, increase bug checking pre-shipping, increase security due to tighter input validation, elimination of a dual transpile configuration (no need to output types separately [tsconfig.build-types.json] in a build command). A single tsconfig.json for the whole project is possible because of this too and other project simplifications (reduced lint config complexity) are possible too.

I would argue that TypeScript is the superior choice rather than JavaScript as it has more features and automatically transpiles to JS with the best practices built into the typescript compiler.

See this project as an example of a project that is a single language that outputs with types and low overhead (includes mocha tests):
https://github.com/Software-Hardware-Integration-Lab/ObjectID-Converter

Reference Documentations/Specifications
https://www.typescriptlang.org/
https://github.com/Software-Hardware-Integration-Lab/ObjectID-Converter/blob/main/tsconfig.json
https://github.com/Software-Hardware-Integration-Lab/ObjectID-Converter/blob/main/eslint.config.mjs

P.s.
As usual, I am willing to make a PR, my other PRs need to be merged first for simplicity on my side before I start working on this.

@MichaelSun90
Copy link
Contributor

Thanks again for helping on this 🙇 . The files should be migrated into typescript beside the test files. I remember that we worked on migrating the test files as well to typescript a while back and there may also be a PR as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants