refactor: strongly type keys of sorts

This commit is contained in:
Sammy Teillet
2023-04-24 14:02:38 +02:00
parent 095a6886ae
commit be947bdc8f
2 changed files with 4 additions and 4 deletions

View File

@ -8,10 +8,10 @@ type OwnProps = {
onRemoveSort: (sortId: string) => void;
};
export type SortType = {
export type SortType<SortIds = string> = {
label: string;
order: 'asc' | 'desc';
id: string;
id: SortIds;
icon?: IconProp;
};