I´m trying to import on my Angular component a module but it only contains a Javascript file and no typescript typings.
I did the following:
import { Component } from "@angular/core";
import * as Highcharts from 'highcharts';
declare function require(name:string);
const HC_Regression = require('highcharts-regression');
HC_Regression(Highcharts);
It works but it feels hacky plus I get a lot of warnings.
First because the function require as explicite type any and second because the function require doesn´t return anything.
Is there a better way of doing this?
How to use Highcharts regression plugin to plot a trend line using angular 8 wrapper
Thanks