style: filterType now dynamic from const

This commit is contained in:
ysandler 2022-06-22 21:41:33 -05:00 committed by joshuashoemaker
parent c9a271e2f4
commit 9d7fe9d5c5

View File

@ -1,3 +1,4 @@
import filterTypes from "../constants/filterTypes"
import Table from "../entities/Table"
import { tableRow } from "./tableTypes"
@ -8,7 +9,9 @@ type noduleConstructorProps = {
tables?: Table[]
}
type filterType = 'EQUAL' | 'GREATER' | 'GREATEREQUAL' | 'LESSER' | 'LESSEREQUAL'
type filterKeys = keyof typeof filterTypes
type filterValues = typeof filterTypes[filterKeys]
type filterType = filterValues
type filterParams = Record<string, string | number>
type filterNoduleConstructionProps = noduleConstructorProps & {filterType: filterType} & {filterParams: filterParams}