type IProps = {
data: (({ icon: any; } | { text: string; }) & { id: string | number })[];
};
type IProps = {
data: Data[];
};
type Data = Data.WithIcon | Data.WithText;
namespace Data {
interface Base {
id: string | number;
}
export interface WithIcon extends Base {
icon: any;
}
export interface WithText extends Base {
text: string;
}
}