I some time ago I created backend in ES6 and I am considering rewriting...
It depends on your knowledge and time. I'd recommend ES6 for better understanding of JS (although TS can do the same). TS is a superset of ES_ so the argument is confusing. I'm guessing this is more so to do with if you want to have a strongly-typed environment versus standard js. If you have limited time TS, but for better understanding of your code (knowledge aspect) I'd recommend ES6. The syntactic sugar and type enforcement can be a hindrance in understanding the double edged sword that is Javascript. You also still could just write ES6 in TS and have both.
I feel like this is not a great question since using Typescript you can choose ES5/6/7/8 for your result and use of all types as well. I would say use Typescript. There is nothing like knowing that if your code compiles it won't error our. Unless of course you typed it wrong. Of course over time you will learn to type things correctly and now I only have errors with other 3rd party things and not my code.
IMO, Typescript + TSLint + VS Code Intellisense is a great combination when writing backend or frontend JS apps.
You still get to use all the great ESNext features with great static typing support and most of the popular npm modules have type definitions available
Especially for back end work where a lot of calculations take place , static typing will help you and as you said you are the only one working so far, it will give you far more control over what is happening.
I think you should answer these question may be before taking the decisions . They are not hard and fast rule but they will guide you in the right direction.
Patrick
Jessica Barnes
Jessica is an expert web development consultant with a wealth of expertise in the IT industry.
I see that the majority upvoted to the "ES6" because ES6 is plain javascript that has more features to the typescript, such as classes, arrow functions and so on. I believe that ES6 is better for the API.