Does anyone know why I am getting this on id field? I checked the database and types and both posts and comments do have id column....
payload.find({
collection: contentCollection,
select: {
id: true, <--- ON THIS LINE
stats: true,
},
where: { id: { equals: contentId } },
}),
Object literal may only specify known properties, and 'id' does not exist in type 'SelectFromCollectionSlug<"posts" | "comments">'.ts(2353)
find.d.ts(85, 5): The expected type comes from property 'select' which is declared here on type 'Options<"posts" | "comments", SelectFromCollectionSlug<"posts" | "comments">>'