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

Nuxt Typescript - fetchOnServer does not exist in type... #3447

Open
4 tasks done
chrissyast opened this issue May 26, 2022 · 0 comments
Open
4 tasks done

Nuxt Typescript - fetchOnServer does not exist in type... #3447

chrissyast opened this issue May 26, 2022 · 0 comments

Comments

@chrissyast
Copy link

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ
  • I have tried restarting VS Code or running Vetur: Restart VLS

Info

  • Platform: Win 10
  • Vetur version: v0.35.0
  • VS Code version: 1.67.2

Problem

No error in VLS

In editor:

(property) fetchOnServer: boolean
No overload matches this call.
  The last overload gave the following error.
    Argument of type '{ fetchOnServer: boolean; data(this: Readonly<Record<never, any>> & Vue): any; }' is not assignable to parameter of type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<DefaultProps>, DefaultProps>'.
      Object literal may only specify known properties, and 'fetchOnServer' does not exist in type 'ComponentOptions<Vue, DefaultData<Vue>, DefaultMethods<Vue>, DefaultComputed, PropsDefinition<DefaultProps>, DefaultProps>'.
Vetur(2769)

However, fetchOnServer is a valid nuxt property https://nuxtjs.org/docs/components-glossary/fetch/#options

Reproducible Case

https://github.com/chrissyast/fetchOnServerBug
Open in VSCode with Vetur extension
npm install
npm run dev
Open pages/index.vue

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

No branches or pull requests

2 participants