import { CellType, CellValue } from '@/lib/types'; import { isString } from 'lodash'; import { parseWatcherFn } from '@/lib/utils/vues'; export const parseCellType = ( cellType: CellType | ((rowData: Record) => CellType) | undefined, formattedRowData: Record, ) => { if (cellType) { return isString(cellType) ? cellType : parseWatcherFn(cellType)(formattedRowData); } return CellType.viewer; };