In my TS project, I am currently using Node, Express, and Handlebars along with some client-side JS successfully. I don't have any other client-side frameworks like React or Angular integrated at this time.
Recently, I have been thinking about converting the client-side JS to TS as well. However, when I tried a simple Hello World example using alert (alert("Hello World");
), I encountered a compilation error (
error TS2304: Cannot find name 'alert'
). It seems like I need to import a module or add a dependency to my package.json file to access core client-side JavaScript functions.
Despite my efforts, I haven't been able to find a clear reference on how to achieve this without relying on specific libraries like Angular or React. Can anyone advise me on the necessary dependencies or imports to expose basic client-side JS functions in my TS project?