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
Is your feature request related to a problem? Please describe
When you're building a query and you use the .only() method you lose the typing because typescript only infers Pick<ParsedContent, string> and not Pick<ParsedContent, "whatever-you-specified">.
I had this problem when using queryContent("...").only(["...","..."]).findSurround()
Describe the solution you'd like
The solution would be using <const K extends keyof T> instead of <K extends keyof T>
The const type parameter was introduced with Typescript 5.0
Describe alternatives you've considered
Letting it stay this way
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe
When you're building a query and you use the
.only()
method you lose the typing because typescript only infersPick<ParsedContent, string>
and notPick<ParsedContent, "whatever-you-specified">
.I had this problem when using queryContent("...").only(["...","..."]).findSurround()
Describe the solution you'd like
The solution would be using
<const K extends keyof T>
instead of<K extends keyof T>
The const type parameter was introduced with Typescript 5.0
Describe alternatives you've considered
Letting it stay this way
Additional context
The text was updated successfully, but these errors were encountered: