You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>>.
The text was updated successfully, but these errors were encountered:
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/cms
I 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/server
andapp/web
I get no suggestions and the return type is alwaysPromise<PaginatedDocs<GeneratedTypes>>
.The text was updated successfully, but these errors were encountered: