import type {ColumnsType} from 'antd/es/table';

export function calcColumnsWidth<T extends ColumnsType<any>>(
  columns: T,
): number {
  return columns.reduce((prev, next) => prev + Number(next?.width ?? '0'), 0);
}
