@types/highcharts - add AnimationOptions type to ChartObject#update method signature and update tests accordingly

This commit is contained in:
Tyrone Dougherty
2018-08-17 11:11:59 +10:00
parent 9a2ef63a1e
commit 2132a14ea9
2 changed files with 7 additions and 2 deletions
+2 -2
View File
@@ -6487,10 +6487,10 @@ declare namespace Highcharts {
* @param [boolean] redraw Whether to redraw the chart. Defaults to true.
* @param [boolean] oneToOne When true, the series, xAxis and yAxis collections will be updated one to one, and
* items will be either added or removed to match the new updated options. Defaults to false.
* @param [boolean] animation Whether to apply animation, and optionally animation configuration.
* @param [(boolean | AnimationOptions)] animation Whether to apply animation, and optionally animation configuration.
* @since 5.0.0
*/
update(options: Options, redraw?: boolean, oneToOne?: boolean, animation?: boolean): void;
update(options: Options, redraw?: boolean, oneToOne?: boolean, animation?: boolean | AnimationOptions): void;
/**
* This method is deprecated as of 2.0.1. Updating the chart position after a move operation is no longer necessary.
* @since 1.2.5
+5
View File
@@ -2457,6 +2457,11 @@ function test_ChartObject() {
chart.update(<Highcharts.Options> {});
chart.update(<Highcharts.Options> {}, true);
chart.update(<Highcharts.Options> {}, true, true);
chart.update(<Highcharts.Options> {}, true, true, true);
chart.update(<Highcharts.Options> {}, true, true, {
delay: 500,
duration: 3000
});
}
function test_ElementObject() {