if (columnFilters.length > 0) { const columnWhereClause: (SQL | undefined)[] = columnFilters.map( (filter) => { const columns = getTableColumns(tasks); if (filter.column in columns) { // getting error on columns[filter.column]: type 'string' can't be used to index type return ilike(columns[filter.column], `%${filter.keyword}%`); } }, ); whereClause.push(and(...columnWhereClause));}