(sort: Sort, idByName: ReadonlyMap<string, string>)
| 166 | |
| 167 | /** Translates a sort's field names → column ids. Unknown fields pass through. */ |
| 168 | export function sortNamesToIds(sort: Sort, idByName: ReadonlyMap<string, string>): Sort { |
| 169 | const out: Sort = {} |
| 170 | for (const [field, dir] of Object.entries(sort)) out[idByName.get(field) ?? field] = dir |
| 171 | return out |
| 172 | } |
| 173 | |
| 174 | /** |
| 175 | * Remaps a stored row keyed by column **id** back to **name** keying for the |
no test coverage detected