I am attempting to use the
findVersions()function as described here:
Hovever, when I try to implement it as directed (see code snippet below, I see a red error squiggly line under the
collection:parameter, with the message
Type 'string is not assignable to type 'never'......The expected type comes from property 'collection' which is declated here on type Options<never>.
const result = await payload.findVersions({
collection: "institutions",
depth: 2,
page: 1,
//other properties
})How can this be the case, given that I'm doing everything exactly according to the documentation?
It appears that this error is inconsequential; I ran
findVersions()despite the error and it worked as expected. 🙂
Hey
@822938405817942046glad you got this sorted out - apologies we didn't get back to you sooner - we were slammed prepping for 2.0.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.