toptobes commented on code in PR #463: URL: https://github.com/apache/cassandra-nodejs-driver/pull/463#discussion_r3331348061
########## proposals/TypeScript_Migration.md: ########## @@ -0,0 +1,175 @@ +# TypeScript Migration Proposal + +There are three reasons that make this the right moment for the driver’s TypeScript migration: + +1\. Type safety – TypeScript has become the standard for maintaining large Node.js libraries. + +2\. ES Modules – ESM is now the official JavaScript module standard, and the ecosystem has largely settled on it. Supporting it opens the driver to tree-shaking and modern bundler workflows, bringing performance gain. + +3\. ES6 classes – The driver's class style is split across ES5 and ES6 conventions. ES5 class is deprecated by Node.js, and is not recognized by modern tools like IDE intellisense. + +Peer projects have made this move and reported this change made their codebases easier to maintain and evolve safely. + +--- + +# 1\. Type Safety: Catching a Class of Bugs Earlier + +The driver pays the cost of types (someone writes index.d.ts) without the benefit (nothing checks it against the implementation). Review Comment: As far as I can tell, the generated tests help and they're somewhat thorough, but they're far from actual proof of absolute synchronization like just writing inline ts files would be -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
