Describe the bug
A clear and concise description of what the bug is.
To Reproduce
In the following example:
const { data: users } = useLiveQuery(q =>
q.from({ u: userCollection })
.select(({ u }) => ({
user: u,
team: q
.from({ t: teamCollection })
.where(({ t }) => eq(t.id, u.team_id))
.findOne()
})))
Expected behavior
The following team is type Collection. I would it expect it to be Team | undefined.
const team = users[0].team // type Collection
Ideally this would behave similar to toArray and return a materialized object.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
In the following example:
Expected behavior
The following
teamis typeCollection. I would it expect it to beTeam | undefined.Ideally this would behave similar to
toArrayand return a materialized object.