Diizzayy / nuxt-graphql-client

⚡️ Minimal GraphQL Client + Code Generation for Nuxt3
https://nuxt-graphql-client.web.app
MIT License
366 stars 44 forks source link

"nuxi generate" not generating types ("nuxi dev" does) #272

Closed some-user123 closed 1 year ago

some-user123 commented 1 year ago

Environment


Describe the bug

Running nuxi dev everything is working great. However, when running nuxi generate the build fails with type error:

❯ app.vue:13:33 - error TS7006: Parameter 'launch' implicitly has an 'any' type.

13   data.value?.launches?.filter((launch) => Number(launch?.launch_year) > 2000)
                                   ~~~~~~

data isn't properly typed, but any.

Expected behaviour

If nuxi dev doesn't fail, nuxi generate shouldn't either.

Reproduction

https://stackblitz.com/edit/github-9fr2zc?file=app.vue

Additional context

// nuxt.config.ts
export default defineNuxtConfig({
  // ...

  ssr: false,

  typescript: {
    typeCheck: true,
    strict: true,
  }
})

Logs

No response

Diizzayy commented 1 year ago

@some-user123 Thank you for raising this issue! v0.2.22 was just released with a fix for this issue.

some-user123 commented 1 year ago

🤩 Awesome, thanks a lot!