From aa6a9737bd780231b0684eeaf6df132a12b7ecec Mon Sep 17 00:00:00 2001 From: Jukka Kurkela Date: Fri, 28 May 2021 14:36:24 +0300 Subject: [PATCH] Add declaration for Decimation plugin (#9172) --- types/index.esm.d.ts | 2 ++ types/tests/register.ts | 52 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 types/tests/register.ts diff --git a/types/index.esm.d.ts b/types/index.esm.d.ts index 175e4f6fcc1..17b06d78d13 100644 --- a/types/index.esm.d.ts +++ b/types/index.esm.d.ts @@ -1953,6 +1953,8 @@ export class BasePlatform { export class BasicPlatform extends BasePlatform {} export class DomPlatform extends BasePlatform {} +export const Decimation: Plugin; + export const enum DecimationAlgorithm { lttb = 'lttb', minmax = 'min-max', diff --git a/types/tests/register.ts b/types/tests/register.ts new file mode 100644 index 00000000000..3e293fcbdb5 --- /dev/null +++ b/types/tests/register.ts @@ -0,0 +1,52 @@ +import { + Chart, + ArcElement, + LineElement, + BarElement, + PointElement, + BarController, + BubbleController, + DoughnutController, + LineController, + PieController, + PolarAreaController, + RadarController, + ScatterController, + CategoryScale, + LinearScale, + LogarithmicScale, + RadialLinearScale, + TimeScale, + TimeSeriesScale, + Decimation, + Filler, + Legend, + Title, + Tooltip +} from '../index.esm'; + +Chart.register( + ArcElement, + LineElement, + BarElement, + PointElement, + BarController, + BubbleController, + DoughnutController, + LineController, + PieController, + PolarAreaController, + RadarController, + ScatterController, + CategoryScale, + LinearScale, + LogarithmicScale, + RadialLinearScale, + TimeScale, + TimeSeriesScale, + Decimation, + Filler, + Legend, + Title, + Tooltip +);