We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
getAll*()
limit
import * as prismic from "@prismicio/client"; const client = prismic.createClient("qwerty"); await client.getAllByType("page", { limit: 3 });
Add the above code to a TypeScript-enabled project. The limit param will throw a type error since the limit param does not exist in the param's type.
Change getAllByType() to any getAll*() method (except dangerouslyGetAll(), which has the correct behavior) to see the error in other methods.
getAllByType()
dangerouslyGetAll()
limit is accepted as a param.
TypeScript throws a type error. The code works correctly at runtime.
The text was updated successfully, but these errors were encountered:
fix: add limit to all getAll*() methods (fixes #233)
01a339f
fix: add limit to all getAll*() methods (fixes #233) (#234)
7d3e4c3
Successfully merging a pull request may close this issue.
Versions
Reproduction
Steps to reproduce
Add the above code to a TypeScript-enabled project. The
limit
param will throw a type error since thelimit
param does not exist in the param's type.Change
getAllByType()
to anygetAll*()
method (exceptdangerouslyGetAll()
, which has the correct behavior) to see the error in other methods.What is expected?
limit
is accepted as a param.What is actually happening?
TypeScript throws a type error. The code works correctly at runtime.
The text was updated successfully, but these errors were encountered: