content icon indicating copy to clipboard operation
content copied to clipboard

Type of `serverQueryContent(event).find()` is different from the actual response

Open Hiratake opened this issue 3 years ago • 4 comments

Environment

  • Operating System: Linux
  • Node Version: v18.17.1
  • Nuxt Version: 3.7.0
  • CLI Version: 3.7.3
  • Nitro Version: 2.6.2
  • Package Manager: [email protected]
  • Builder: -
  • User Config: modules, nitro, routeRules
  • Runtime Modules: @nuxt/[email protected]
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/stackblitz-starters-f6avth

Describe the bug

The type of the result of serverQueryContent(event).find() is an object of type ContentQueryFindResponse<ParsedContent>. However, the actual value is an array of ParsedContent.

img01

These properties do not exist.

Additional context

On StackBlitz, it shows any for some reason. On the local VSCode, the type is displayed, as well as the possible properties that exist for the object.

Logs

No response

Hiratake avatar Aug 31 '23 06:08 Hiratake

This should be fixed in edge channel.

farnabaz avatar Aug 31 '23 12:08 farnabaz

@farnabaz Thank you for fixing this issue! Using edge channel fixed the error.

Hiratake avatar Sep 01 '23 01:09 Hiratake

Should I close this issue (#2273)? After the release of the new version?

Hiratake avatar Sep 01 '23 01:09 Hiratake

Released in v2.8.2.

farnabaz avatar Sep 01 '23 14:09 farnabaz