diff --git a/highcharts/highcharts-more.d.ts b/highcharts/highcharts-more.d.ts index dd5950fe35..14f4940784 100644 --- a/highcharts/highcharts-more.d.ts +++ b/highcharts/highcharts-more.d.ts @@ -3,6 +3,8 @@ // Definitions by: Maciej Suchecki // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import * as Highcharts from "highcharts"; + declare var HighchartsMore: (H: Highcharts.Static) => Highcharts.Static; export = HighchartsMore; export as namespace HighchartsMore; diff --git a/highcharts/highstock.d.ts b/highcharts/highstock.d.ts index 332ea3d5ca..6784e83eb1 100644 --- a/highcharts/highstock.d.ts +++ b/highcharts/highstock.d.ts @@ -3,6 +3,8 @@ // Definitions by: David Deutsch // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +import * as Highcharts from "highcharts"; + declare namespace __Highstock { interface ChartObject extends Highcharts.ChartObject { options: Options; @@ -96,27 +98,29 @@ declare namespace __Highstock { } -interface JQuery { - highcharts(type: "StockChart"): __Highstock.ChartObject; - /** - * Creates a new Highcharts.Chart for the current JQuery selector; usually - * a div selected by $('#container') - * @param {Highcharts.Options} options Options for this chart - * @return current {JQuery} selector the current JQuery selector - **/ - highcharts(type: "StockChart", options: __Highstock.Options): JQuery; - /** - * Creates a new Highcharts.Chart for the current JQuery selector; usually - * a div selected by $('#container') - * @param {Highcharts.Options} options Options for this chart - * @param callback Callback function used to manipulate the constructed chart instance - * @return current {JQuery} selector the current JQuery selector - **/ - highcharts(type: "StockChart", options: __Highstock.Options, callback: (chart: __Highstock.ChartObject) => void): JQuery; +declare global { + interface JQuery { + highcharts(type: "StockChart"): __Highstock.ChartObject; + /** + * Creates a new Highcharts.Chart for the current JQuery selector; usually + * a div selected by $('#container') + * @param {Highcharts.Options} options Options for this chart + * @return current {JQuery} selector the current JQuery selector + **/ + highcharts(type: "StockChart", options: __Highstock.Options): JQuery; + /** + * Creates a new Highcharts.Chart for the current JQuery selector; usually + * a div selected by $('#container') + * @param {Highcharts.Options} options Options for this chart + * @param callback Callback function used to manipulate the constructed chart instance + * @return current {JQuery} selector the current JQuery selector + **/ + highcharts(type: "StockChart", options: __Highstock.Options, callback: (chart: __Highstock.ChartObject) => void): JQuery; - highcharts(type: string): Highcharts.ChartObject; - highcharts(type: string, options: Highcharts.Options): JQuery; - highcharts(type: string, options: Highcharts.Options, callback: (chart: Highcharts.ChartObject) => void): JQuery; + highcharts(type: string): Highcharts.ChartObject; + highcharts(type: string, options: Highcharts.Options): JQuery; + highcharts(type: string, options: Highcharts.Options, callback: (chart: Highcharts.ChartObject) => void): JQuery; + } }