Closed SiarheiBokuts closed 2 years ago
Good catch! Looks like it's also an error within the documentation: https://prismic.io/docs/technologies/rest-api-technical-reference#not
The not
predicate should work the same way as the at
one, expecting a single value for all except document.tags
where an array is desired.
PR is welcome to update the type on @prismicio/client: https://github.com/prismicio/prismic-client/blob/master/src/predicate.ts#L105-L111 βΊοΈ
Hey @LeoLfL, I just published @lihbr's fix (see the PR here) in @prismicio/client@v6.5.0
.
Updating to the latest version should fix the TypeScript error:
npm i @prismicio/client@latest
Thanks for reporting the bug!
Versions
Reproduction
It looks like the types for prismic.predicate.not and for some others are incorrect.
it's expected the single value
but in this case prismic API return error :
and the correct one is using array :