where
doesn't expect a function inside ( todo=>
), but rather just a boolean thing. So, to make your code work, write something like from(TodoDb.todos)(todo => where(todo.userid === userid) select
.
BTW, I suggest to be immediately cautious when seeing a code fragment like (todo => where (todo =>
(double "todo" definition).