explore all different models.
I hoped to be able to use Highcharts with typescript without "babel", "react" or "angular" etc.
I hoped to be able to use the instructions for "Typescript + ESM from CDN",
https://github.com/highcharts/highchart ... m-from-cdn
I copied the tsconfig.json and the small typescript file, but this doesn't seem to work:
Code: Select all
hc.ts:2:24 - error TS2307: Cannot find module 'https://code.highcharts.com/es-modules/masters/highcharts.src.js' or its corresponding type declarations.
2 import Highcharts from 'https://code.highcharts.com/es-modules/masters/highcharts.src.js';
Code: Select all
// Load modules the ES6 way
import Highcharts from 'https://code.highcharts.com/es-modules/masters/highcharts.src.js';
import 'https://code.highcharts.com/es-modules/masters/modules/exporting.src.js';
// Generate the chart
Highcharts.chart('container', {
// options - see https://api.highcharts.com/highcharts
});
Downloading highcharts from github.. It seems that all tests work without error.
Could you point me to a simple ts file containing a Highchart chart and a simple html file that would run on my chrome browser?
Thanks,
Lourens
I started a jsfiddle, but do not know how to add a tsconfig.json there (tsc generates require then).
https://jsfiddle.net/lourensm/yucpx9nq/