I'm new to TS and am trying to convert an old project from JS to TS (browser not Node). I've looked through almost all the relevant questions on StackOverflow but just cannot find a satisfactory answer. (For the record, this is not a modern JS webapp that uses React or whatever, it's a WebGL project).
Let's say I have a plain JavaScript file (not a module) containing some functions that I would normally just add
<script src="utils.js"></script>
to include in the project, and I'll have access to those functions in other JS files I include, how to I accomplish that in TypeScript and get autocompletion?
I'm using VSCode and for the life of me I just cannot get it to recognise those functions. I've tried writing a .d.ts header for the file, and tried imports, but all of the documentation I could find on those seem to be catered towards Modules which I'm not using.