DEV Community

loading...

Discussion on: How to UPPER_CASE to camelCase in raw Typescript generics

Collapse
svehla profile image
Jakub Švehla Author

Yeah, 😄 you're right that this solution is not too fast and TS checked could be pretty stuck on large codebases projects.

I think that there is the other side of the coin if you look at the static types as an alternative for "unit tests" (especially for smaller codebase where 100% accuracy code is not needed). So it's pretty good to have only one source of truth in your codebase instead of taking care of your .js files and your tests (.spec.js|.test.js) files.

Another nice feature of this solution is that you can remove it and replace upper code with a simple any and your runtime javascript will still be Okey :D

But I have to agree that efficiency is not the best one... :(