From 21990fbb126774824260f70a76e55bf411948ca3 Mon Sep 17 00:00:00 2001 From: xr0master Date: Sat, 12 Sep 2020 15:46:17 +0300 Subject: [PATCH] Merge Chart instance with Chart factory (#7783) Co-authored-by: Sergey Khomushin --- types/core/index.d.ts | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/types/core/index.d.ts b/types/core/index.d.ts index 483634438..7eff0b254 100644 --- a/types/core/index.d.ts +++ b/types/core/index.d.ts @@ -232,7 +232,7 @@ export interface IParsingOptions { | false; } -export interface Chart { +export declare class Chart { readonly platform: BasePlatform; readonly id: string; readonly canvas: HTMLCanvasElement; @@ -251,6 +251,8 @@ export interface Chart['data']; options: IChartConfiguration['options']; + constructor(item: ChartItem, config: IChartConfiguration); + clear(): this; stop(): this; @@ -284,6 +286,12 @@ export interface Chart; -export const Chart: { - prototype: Chart; - new ( - item: ChartItem, - config: IChartConfiguration - ): Chart; - - readonly version: string; - readonly instances: { [key: string]: Chart }; - readonly registry: Registry; - register(...items: IChartComponentLike[]): void; - unregister(...items: IChartComponentLike[]): void; -}; - export enum UpdateModeEnum { resize = 'resize', reset = 'reset', -- 2.47.3