I started switching to NodeJS, and building a personal project using NextJS framework.
I come to the point where I need to implement my View-Controller.
The official documentation from NestJS suggests using "Handlebars (hbs)"
It's working fine, aside from the fact that it's really bare-bones (I literally have to write helpers/addons for simple comparative conditional statements), I also learned that it doesn't autocomplete nor infer the variables/data that I passed to the template. Or at least the VSCode cannot infer it? I just believe that it's a bummer that the View part cannot extract the Typescript benefit.
Is there another templating engine I can use which can give autocomplete suggestions, and infer variables passed to it? Example: If I pass an object {foo:"bar"} to the template, hopefully on my VSCode, it can infer that it's an object with the key foo that has a string type value.
My next solution seems to be using ReactJS, which supports typescript so I can pass the interface, DTOs, shapes, and types to it. But, hopefully, I don't have to go to this route because that means I would have to start exposing API endpoints as well. And all the overkill shenanigans I have to deal with.
Regards,