I have added // @ts-check
to a JavaScript file to use JSDoc. Suddenly I get errors in VS Code for functions included with a script tag:
<script src="imported-file.js"></script>
I can silence these by adding a lot of // @ts-ignore
(or maybe other ways?). But that would in my case just make JSDoc/TypeScript a burden.
So instead I wonder what types of ES6 includes/imports JSDoc/TypeScript can handle in VS Code. Can it handle module imports like this one below?
<script type="module" src="imported-file.js"></script>
Can it handle dynamic imports?
const myImportedModule = await import("imported-file.js");
Is there any good documentation about this?