import { BooleanItem , ColorItem , DefItem , DropdownItem , ItemType , NumberItem , PercentageItem , SectionItem , TextItem } from './types' ; export const isSectionItem = ( item ) : item is SectionItem => { return item . type === ItemType . SECTION ; } ; export const isNumberItem = ( item ) : item is NumberItem => { return item . type === ItemType . NUMBER ; } ; export const isPercentageItem = ( item ) : item is PercentageItem => { return item . type === ItemType . PERCENTAGE ; } ; export const isBooleanItem = ( item ) : item is BooleanItem => { return item . type === ItemType . BOOLEAN ; } ; export const isTextItem = ( item ) : item is TextItem => { return item . type === ItemType . TEXT ; } ; export const isColorItem = ( item ) : item is ColorItem => { return item . type === ItemType . COLOR ; } ; export const isDropdownItem = ( item ) : item is DropdownItem => { return item . type === ItemType . DROPDOWN ; } ;