From 2132a14ea96e61a3ef951d3dce3dad43e07d339c Mon Sep 17 00:00:00 2001 From: Tyrone Dougherty Date: Fri, 17 Aug 2018 11:11:59 +1000 Subject: [PATCH] @types/highcharts - add AnimationOptions type to ChartObject#update method signature and update tests accordingly --- types/highcharts/index.d.ts | 4 ++-- types/highcharts/test/index.ts | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/types/highcharts/index.d.ts b/types/highcharts/index.d.ts index afe1e51a98..2ec1d268d6 100644 --- a/types/highcharts/index.d.ts +++ b/types/highcharts/index.d.ts @@ -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 diff --git a/types/highcharts/test/index.ts b/types/highcharts/test/index.ts index 1d6e921461..963a53d9bb 100644 --- a/types/highcharts/test/index.ts +++ b/types/highcharts/test/index.ts @@ -2457,6 +2457,11 @@ function test_ChartObject() { chart.update( {}); chart.update( {}, true); chart.update( {}, true, true); + chart.update( {}, true, true, true); + chart.update( {}, true, true, { + delay: 500, + duration: 3000 + }); } function test_ElementObject() {