How can we get proper type inference on returned values using the payload Local API on the frontend?
For example, when typing req.payload.find({collection: ' within app/cms I get proper suggestions of my collections. If I were to finish that as req.payload.find({collection: 'users'}) then the return type is Promise<PaginatedDocs<User>>.
In app/server and app/web I get no suggestions and the return type is always Promise<PaginatedDocs<GeneratedTypes>>.
How can we get proper type inference on returned values using the payload Local API on the frontend?
For example, when typing
req.payload.find({collection: 'withinapp/cmsI get proper suggestions of my collections. If I were to finish that asreq.payload.find({collection: 'users'})then the return type isPromise<PaginatedDocs<User>>.In
app/serverandapp/webI get no suggestions and the return type is alwaysPromise<PaginatedDocs<GeneratedTypes>>.