These days, I would not write a pure JS app if I could help it. JS is so dynamic that TS is a mandatory step for safety whenever it’s possible to use the TSC compiler.
This way you can split the type checking from the actual bundling, as esbuild only does the latter.
edit: nevermind i get what you're saying. check types with tsc and dev work with esbuild