style: filterType now dynamic from const
This commit is contained in:
parent
10f02a924d
commit
bdad848f45
@ -1,3 +1,4 @@
|
|||||||
|
import filterTypes from "../constants/filterTypes"
|
||||||
import Table from "../entities/Table"
|
import Table from "../entities/Table"
|
||||||
import { tableRow } from "./tableTypes"
|
import { tableRow } from "./tableTypes"
|
||||||
|
|
||||||
@ -8,7 +9,9 @@ type noduleConstructorProps = {
|
|||||||
tables?: Table[]
|
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 filterParams = Record<string, string | number>
|
||||||
type filterNoduleConstructionProps = noduleConstructorProps & {filterType: filterType} & {filterParams: filterParams}
|
type filterNoduleConstructionProps = noduleConstructorProps & {filterType: filterType} & {filterParams: filterParams}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user