Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: common data type #2321

Merged
merged 1 commit into from
Dec 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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