Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local API queries in server or frontend always retrun GeneratedType type. #17

Open
revnelson opened this issue Jul 9, 2023 · 0 comments

Comments

@revnelson
Copy link

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>>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant