Open prabh1234assla opened 6 months ago
Hi there! Thanks for opening this issue. We appreciate your contribution to this open-source project. We aim to respond or assign your issue as soon as possible.
@prabh1234assla This needs contribution from lot of contributors to completely migrate to TypeScript. It will work as parent issue. Will decide the approach soon to tackle this issue and comeback to this
I can easily convert the full codebase to Ts. Just give me a chance.
I've successfully utilized TypeScript across projects integrating React-Three/Fiber, React-Three/drei, Three.js and React Spring into Next.js for immersive 3D websites, implemented WebRTC and sockets in TypeScript codebases, and built scalable solutions with Gatsby, GraphQL, and TypeScript, all with a focus on robustness and efficiency. I think I have required know-how on how to handle the TypeScript codebases.
You can check my github for the same.
Okay raise an issue of incorporating initial changes of introducing eslintric.json , tsconfig etc...changes that setups ready to go migration
It seems there are only few files to change. Ok assigning
I have done all changes. And I raised a PR for same. One check was not working. Namely VERCEL FAILED TO DEPLOY ON PREVIEW. He rejected PR. Help me in removing that issue so that I can raise and merge PR again.
@urstrulynishkarsh please assign me this issue and Why you closed my PR i need answers. Please respond sir.
Please wait dear for ui updation currently our team wokring on frotend
On Sat, 25 May 2024 at 10:57 PM, Prabhdeep Singh Assla < @.***> wrote:
@urstrulynishkarsh https://github.com/urstrulynishkarsh please assign me this issue and Why you closed my PR i need answers. Please respond sir.
— Reply to this email directly, view it on GitHub https://github.com/urstrulynishkarsh/ReactChat/issues/150#issuecomment-2131368273, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXH6TTXIVSIIQI6G7A527MTZEDCXDAVCNFSM6AAAAABIB2CZ6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZRGM3DQMRXGM . You are receiving this because you were mentioned.Message ID: @.***>
@urstrulynishkarsh please assign me this issue and Why you closed my PR i need answers. Please respond sir.
pls check your files again
Describe the feature
I will be migrating our current Vanilla JavaScript codebase to a type-checked TypeScript codebase. This involves setting up TypeScript, gradually converting JavaScript files to TypeScript, and adding type annotations to ensure robustness. The process includes refactoring code for simplicity and adherence to best practices, running comprehensive tests to validate functionality, and updating documentation. This transition aims to improve code quality, readability, and maintainability, ultimately enhancing the efficiency and reliability of our development process.
It should be implemented because
Why Ts and why not pure vanilla js?
TypeScript stands out from vanilla JavaScript with its outstanding features like static typing, interfaces, enums, generics, union types, type guards, and decorators. These features collectively enhance code quality, readability, and maintainability, while also significantly reducing the occurrence of bugs and errors. By providing a more structured and expressive way to write code, TypeScript empowers developers to build complex applications with confidence, offering a smoother development experience and facilitating collaboration within teams.
Additional context
Here is how I will handle my js to ts conversion
Install TypeScript: I will begin by installing TypeScript globally using npm or yarn.
npm install -g typescript
Rename Files: Change the file extensions of all JavaScript files to TypeScript files. For JSX files, I will change the extension to .tsx.
Enable TypeScript Configuration: If project doesn't have a tsconfig.json file, I will create one using the following command:
tsc --init
Start Converting: Begin converting my JavaScript code to TypeScript by following these steps:
Clean Class Design: When converting existing JavaScript classes to TypeScript, refactor them to adhere to clean and object-oriented design principles, ensuring the new TypeScript codebase is more organized and maintainable.
Enums: Replace constants with enums to improve code readability and maintainability.
Additional things I will consider While converting the Js codebase to Ts codebase :
Resolve Compilation Errors: As I convert your code, TypeScript might raise compilation errors due to type inconsistencies or other issues. I will make sure to address these errors one by one by refining your type annotations and ensuring compatibility with TypeScript's type system.
Incremental Adoption: If the codebase is extensive, I will consider adopting TypeScript incrementally. I will start by converting individual modules or components and gradually expand the TypeScript coverage across the project.
Testing and Validation: Test the TypeScript code thoroughly to ensure it behaves as expected. Use TypeScript's type system to catch errors early in the development process, reducing the likelihood of runtime issues.
Continuous Integration: Integrate TypeScript conversion into continuous integration pipeline to ensure that new changes adhere to TypeScript standards and do not introduce regressions.
Documentation and Training: Update project documentation to familiarize team members with TypeScript features.
Would you like to work on this issue?
Yes