Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Infer specific column value type in aggregations (#5297)
The first overload of TypePreservingAggregation (taking columnName and options) used `Readonly<TKey>` for the columnName type. In this context, `TKey` is supposed to be a single column name, but `Readonly<TKey>` maps over the full constraint of `ResolveTableType<TRecord>`. This results in `TKey` being a union of all keys in the table, rather than a single key. Because of this, the result type ends up being a union of all values in the table. The fix is to remove the `Readonly` type, which is fine since `TKey` is a string and not an object like in the other overloads.
- Loading branch information