diff --git a/lib/core.d.ts b/lib/core.d.ts index 568c4f8..94337ee 100644 --- a/lib/core.d.ts +++ b/lib/core.d.ts @@ -1,39 +1,11 @@ /// import * as React from 'react'; +import {ReactEchartsPropsTypes} from './index.d' -type Func = (...args: any[]) => any; - -interface EventMap { - [key: string]: Func, -} - -interface ObjectMap { - [key: string]: any, -} - -interface optsMap { - devicePixelRatio?: number, - renderer?: 'canvas' | 'svg', - width?: number | null | undefined | 'auto', - height?: number | null | undefined | 'auto', -} - -// Index -export interface ReactEchartsPropsTypes { - option: ObjectMap; - notMerge?: boolean; - lazyUpdate?: boolean; - style?: ObjectMap; - className?: string; - theme?: string | null | ObjectMap; - onChartReady?: Func; - showLoading?: boolean; - loadingOption?: ObjectMap; - onEvents?: EventMap; +// Core +export interface ReactEchartsCorePropsTypes extends ReactEchartsPropsTypes{ echarts: object; - opts?: optsMap; - shouldSetOption?: Func; } -export default class ReactEchartsCore extends React.Component{} +export default class ReactEchartsCore extends React.Component{} diff --git a/lib/index.d.ts b/lib/index.d.ts index af609a6..bcc2ff0 100644 --- a/lib/index.d.ts +++ b/lib/index.d.ts @@ -26,12 +26,11 @@ export interface ReactEchartsPropsTypes { lazyUpdate?: boolean; style?: ObjectMap; className?: string; - theme?: string | null; + theme?: string | null | ObjectMap; onChartReady?: Func; showLoading?: boolean; loadingOption?: ObjectMap; onEvents?: EventMap; - echarts?: object; opts?: optsMap; shouldSetOption?: Func; }