remix-server
remix-server copied to clipboard
Local API queries in server or frontend always retrun GeneratedType type.
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>>.