Code navigation in VSCode doesn’t work on external *.js files

I have some script tags in head of index.html

<head>
    <link rel="stylesheet" href="space.css">
    <script src="../highcharts/code/highcharts.src.js" defer ></script>
    <script src="../highcharts/code/highcharts-3d.src.js" defer ></script>
    <script src="../highcharts/code/modules/exporting.src.js" defer ></script>
    <script src="../highcharts/code/modules/export-data.src.js" defer ></script>
    <script src="../highcharts/code/modules/accessibility.src.js" defer ></script>
    <script src="./space.js" defer ></script>
</head>

in space.js, I’d like hover and code navigation to work, but it doesn’t (hover gives type ‘any’. I added a jsconfig.json which didn’t seem to help:

{
    "compilerOptions": {
        "target": "ES6"
    }
}

I tried:

/// <reference path="./code/highcharts.src.js" />

I tried annotating my code:

// Set up the chart
/**
 * @param chart Highcharts.Chart
 */
const chart = Highcharts.chart('container',{
    chart: {
        margin: 200,
        type: 'scatter3d',

. The JSDoc did tell echo back that chart was the type I declared it to be, but no more. Any help appreciated.