Skip to content

[Feature] (TypeScript) The OptionDataItemObject type has not be exported #20755

@ZacharyBear

Description

@ZacharyBear

What problem does this feature solve?

Some typescript supporting for the OptionDataItemObject and its child interfaces.

Now I have to define the OptionDataItem in my own project:

// TODO The same as ECharts' declaration
type OptionDataItemObject<T> = {
    id?: OptionId;
    name?: OptionName;
    groupId?: OptionId;
    childGroupId?: OptionId;
    value?: T[] | T;
    selected?: boolean;
};

const load = (data: OptionDataItemObject<number>) => {
  //...
}

What does the proposed API look like?

I don't need to describe the ECharts' types

Metadata

Metadata

Assignees

No one assigned

    Labels

    enThis issue is in Englishnew-featurependingWe are not sure about whether this is a bug/new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions