import { Table } from "./Table"; import { ColName } from "./Types"; export class ConflictTarget { public static tableColumns(cols: (keyof Cols)[]): ConflictTarget { return { tableCols: cols.slice() }; } protected dummy: [ConflictTarget, Cols]; } export function conflictTargetTableColumns(conflictTarget: ConflictTarget, table: Table): ColName[] { const result: ColName[] = []; for (const col of ((conflictTarget).tableCols)) { for (const t of table.tableCols) { if (t.propName === col) { result.push(t.name); break; } } } return result; }