core icon indicating copy to clipboard operation
core copied to clipboard

enhancement: TypeScript conversion of core package

Open PritamBag opened this issue 9 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently, the core package is written in JavaScript, which leads to some challenges with type safety, error prevention, and auto-completion during development. Without TypeScript, there is also a higher risk of introducing bugs, especially in large codebases, as no strict typing or type checks in place.

Describe the solution you'd like

The solution is to refactor and convert the core package into TypeScript. This would include:

  • Adding TypeScript typings to the entire codebase
  • Converting existing JavaScript files into TypeScript files
  • Ensuring that all functions, variables, and methods have clear and strict types defined
  • Setting up TypeScript configuration (tsconfig.json) to ensure smooth compilation and development experience

This would provide the following benefits:

  • Type safety, reducing the number of runtime errors
  • Better autocompletion and documentation in IDEs
  • Easier to maintain and scale the codebase, especially for new contributors
  • Improved developer experience with modern tooling support

Describe alternatives you've considered

An alternative solution would be to gradually migrate the core package into TypeScript over time. This could involve adding TypeScript incrementally to smaller modules or features while keeping the JavaScript code intact. However, this may lead to inconsistency in the codebase and delay the full benefits

PritamBag avatar Mar 06 '25 16:03 PritamBag