Skip to content

Commit

Permalink
[chore] update filter types (#2153)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <[email protected]>
Co-authored-by: Ilija Puaca <[email protected]>
  • Loading branch information
igorDykhta and ilijapuaca authored Mar 8, 2023
1 parent ce4e5c7 commit 245ac53
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/types/reducers.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,9 @@ export type FilterDatasetOpt = {

/* DUPLICATES OF FILTER TYPES ABOVE, REMOVE ONCE TYPES ABOVE ARE FIXED */

export type TypedRangeFilter = FilterBase<LineChart> &
type FilterBaseOmitRedudant = Omit<FilterBase<LineChart>, 'type' | 'domain'>;

export type TypedRangeFilter = FilterBaseOmitRedudant &
RangeFieldDomain & {
type: 'range';
fieldType: 'real' | 'integer';
Expand All @@ -459,21 +461,21 @@ export type TypedRangeFilter = FilterBase<LineChart> &
typeOptions: ['range'];
};

export type TypedSelectFilter = FilterBase<LineChart> &
export type TypedSelectFilter = FilterBaseOmitRedudant &
SelectFieldDomain & {
type: 'select';
fieldType: 'boolean';
value: boolean;
};

export type TypedMultiSelectFilter = FilterBase<LineChart> &
export type TypedMultiSelectFilter = FilterBaseOmitRedudant &
MultiSelectFieldDomain & {
type: 'multiSelect';
fieldType: 'string' | 'date';
value: string[];
};

export type TypedTimeRangeFilter = FilterBase<LineChart> &
export type TypedTimeRangeFilter = FilterBaseOmitRedudant &
TimeRangeFieldDomain & {
type: 'timeRange';
fieldType: 'timestamp';
Expand All @@ -486,7 +488,7 @@ export type TypedTimeRangeFilter = FilterBase<LineChart> &
animationWindow: string;
};

export type TypedPolygonFilter = FilterBase<LineChart> & {
export type TypedPolygonFilter = FilterBaseOmitRedudant & {
layerId: string[];
type: 'polygon';
fixedDomain: true;
Expand Down

0 comments on commit 245ac53

Please sign in to comment.