Skip to content

Commit

Permalink
fix: common data type
Browse files Browse the repository at this point in the history
  • Loading branch information
lxfu1 committed Dec 27, 2023
1 parent dbde6e1 commit d56d0be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/plots/src/interface.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TooltipComponent } from '@antv/g2';
import type { TooltipComponent, Data as G2Data } from '@antv/g2';
import { Options, Spec } from './core';

/**
Expand Down Expand Up @@ -93,12 +93,12 @@ export interface AttachConfig {
*/
export type PlotEvent = any; // 来自 G2 ,临时使用 any

export type Datum = any; // 来自 G2 ,临时使用 any
export type Datum = G2Data | any[];

type TransformType<T> = T extends object ? { [P in keyof T]: TransformType<T[P]> } : T;

export interface Common extends AttachConfig, ContainerConfig {
data?: Datum[];
data?: Datum;
/**
* @title 内部属性,只读
*/
Expand Down

0 comments on commit d56d0be

Please sign in to comment.