kysely icon indicating copy to clipboard operation
kysely copied to clipboard

Loose typechecking on innerJoin/leftJoin comparisons

Open thelinuxlich opened this issue 1 year ago • 5 comments

This was a bit surprising, as it shows a type error correctly on where comparisons, see this simple example using branded types

https://kyse.link/Rbodk

(updated the reproduction with whereRef and where)

thelinuxlich avatar Jan 22 '24 14:01 thelinuxlich

whereRef also has the same loose type issue. You used where which compares the column to a value "u.id".

koskimas avatar Jan 23 '24 11:01 koskimas

Oh yeah, I always forget these two are separate, my bad, gonna update the example

thelinuxlich avatar Jan 23 '24 15:01 thelinuxlich