I have some reusable FieldHooks where I am doing for example:
payload.findByID({
collection: req.collection.config.slug,
...
})
Because of the new type inference scheme, which I do like very much, req.collection.config.slug no longer fits into the collection parameter of payload query operations:
Type 'string' is not assignable to type '"users" | ...'.ts(2322)
The expected type comes from property 'collection' which is declared here on type 'Options<"users" | ...>'
Marking it as any solves the problem for now, but curious if this might be something worth looking into.