I want to develop in typescript instead of plain javascript for the code that gets sent to the user's browser. I am using the CL tool clasp to push my local files to my project.
I have three .ts files:
Code.ts -- Server Side Code
types.ts -- Mixed between both ends
IndexScript.ts -- Only meant for the browser.
In my JavaScript.html file, I want to have the following since without it the file is getting large:
<script src='jquery URL'></script>
<script src='<unknown>'></script>
and then template it in with <?!= include('JavaScript'); ?>.
I'm not sure what to put for the src tag. My problem is that clasp transforms all the ts files to gs files. How can I use typescript + JQuery for my front end and share types from a separate file between both ends?
I tried to just transpile these files with typescript and it keeps causing naming collisions with clasp.
If I don't transpile I end up with this error:
TypeError: Cannot assign to read only property '__esModule' of object '#' (line 2, file "IndexJavascript")