From discord: https://discord.com/channels/719702312431386674/1369767025723052134/1474732210967019644
Coalesce returns BasicExpression which means if you use it in .select(), all your fields end up typed as any. in my case I'm doing a full join + coalesce to merge two tables and the whole result loses its types.
Looking at the source it's just (...args: Array): BasicExpression so the generic is never inferred from the args.
For now I'm just casting the result but would be nice to get proper inference out of the box.
minimal example:
import { coalesce } from "@tanstack/db";
// coalesce always returns BasicExpression<any>, losing type info
const a = coalesce("hello", "world"); // BasicExpression<any>
const b = coalesce(1, 2); // BasicExpression<any>