import type { Column } from './types' export function resolveId>( row: T, idKey: string | undefined, columns: Column[], ): string { if (idKey && row[idKey] !== undefined) return String(row[idKey]) if (row['id'] !== undefined) return String(row['id']) const firstKey = columns[0]?.key ?? Object.keys(row)[0] return String(row[firstKey] ?? '') }