score:4

yes you can use js code in your typescript files but the compiler needs to know about the objects and libraries you use. you have two options to make this compile. either add the .d.ts file for your library or to fool the compiler you can declare the highcharts object yourself like this.

declare var highcharts: any;
var initializechart1 = function () {
    require(['jquery', 'highcharts', 'highchartsmore', 'highchartsexporting'], function ($) {

        $("#mychart").highcharts({

            chart: {
                type: 'spline',
                backgroundcolor: '#ececec',
                animation: highcharts.svg, // don't animate in old ie

Related Query

More Query from same tag