Skip to content

Commit

Permalink
feat: update types
Browse files Browse the repository at this point in the history
  • Loading branch information
dodoag committed Sep 25, 2024
1 parent f90ab4a commit b801e29
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
import { CSSProperties } from 'react';
import { init } from 'echarts';

export type EChartsOption = any;

export type EChartsInstance = any;

export type Opts = {
readonly devicePixelRatio?: number;
readonly renderer?: 'canvas' | 'svg';
readonly width?: number | null | undefined | 'auto';
readonly height?: number | null | undefined | 'auto';
readonly locale?: string;
};
export type EchartsInitParameters = Parameters<typeof init>;

export type Theme = EchartsInitParameters[1];

export type Opts = EchartsInitParameters[2];

export type EChartsReactProps = {
/**
Expand All @@ -34,7 +33,7 @@ export type EChartsReactProps = {
* 1. theme name string
* 2. theme object
*/
readonly theme?: string | Record<string, any>;
readonly theme?: Theme;
/**
* notMerge config for echarts, default is `false`
*/
Expand Down

0 comments on commit b801e29

Please sign in to comment.