-
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
npm run find:selection
Here :
// ...
const countInInclude = await db.user.findFirst({
include: {
posts: {select: { title: true }},
_count: {select: {posts: true}}
}
})
console.log("countInInclude", countInInclude)
// @ts-expect-error
console.log(countInInclude?._count) // <- typing issue
Works at runtime as expected :
// ...
countInInclude {
id: 1,
email: 'u1@test.com',
profile: null,
posts: [ { title: 'Post1' } ],
_count: { posts: 1 }
}
1ymc9
Metadata
Metadata
Assignees
Labels
No labels