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