diff --git a/src/types/noduleTypes.ts b/src/types/noduleTypes.ts index 697133d..b2c13b5 100644 --- a/src/types/noduleTypes.ts +++ b/src/types/noduleTypes.ts @@ -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 type filterNoduleConstructionProps = noduleConstructorProps & {filterType: filterType} & {filterParams: filterParams}