Why is eb inferred as any in this update query?

I'm trying to do an update from values inserted in a CTE. But the update's set operation doesn't seem to properly infer a type for the eb variable in its expression builder. If I change the where clause to an eb callback, it does properly infer the type, which makes me concerned I'm not doing this correctly. Am I doing something wrong? Is this a minor typing bug? Here's the code example: https://kyse.link/?p=s&i=zmq2zEhTRnuYMyHNhhyc
2 Replies
koskimas
koskimas12mo ago
Well probably because you've cast the kysely instance to Kysely<any>
significantotter
significantotter12mo ago
Yup, it's for use in a migration, which I think are supposed to do that, right? When I do
.where(eb=>/**/)
.where(eb=>/**/)
after that, it does infer eb as:
(parameter) eb: ExpressionBuilder<{
[x: string]: any;
[x: number]: any;
[x: symbol]: any;
}, "sheet_insert" | "initiative_actor">
(parameter) eb: ExpressionBuilder<{
[x: string]: any;
[x: number]: any;
[x: symbol]: any;
}, "sheet_insert" | "initiative_actor">
Want results from more Discord servers?
Add your server