I'm trying to create a really simple website with:
- A few JavaScript files that are directly included in the
index.html
- No modules /
import
statements - No bundling system or direct compilation step
- No requirement for a server to be run (so
index.html
can be double-clicked without CORS issues)
BUT I'd love to be able to use TypeScript's @ts-check
or jsconfig.json
within VS Code, and for it to understand the global scope of the code across JavaScript files. However, I'm finding that it's unable to jump to definitions between JavaScript files (or at least, inconsistently?).
Is there a way to tell the TypeScript compiler that all the JavaScript files are in global scope together, and to use the correct order of evaluation from the index.html
?