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

? missing in experimental section of the config #2393

Closed
mathieunicolas opened this issue Oct 23, 2023 · 0 comments
Closed

? missing in experimental section of the config #2393

mathieunicolas opened this issue Oct 23, 2023 · 0 comments

Comments

@mathieunicolas
Copy link
Contributor

mathieunicolas commented Oct 23, 2023

Environment

  • Operating System: Darwin
  • Node Version: v19.6.0
  • Nuxt Version: 3.8.0
  • CLI Version: 3.9.1
  • Nitro Version: 2.7.0
  • Package Manager: npm@9.4.0
  • Builder: -
  • User Config: app, typescript, ssr, vue, hooks, modules, runtimeConfig, content, supabase
  • Runtime Modules: @nuxt/ui@2.9.0-28296655.4a18ff1, @nuxtjs/supabase@1.1.3, @vueuse/nuxt@10.5.0, @nuxt/content@2.8.5, @pinia/nuxt@0.5.1
  • Build Modules: -

Reproduction

I opened a PR : #2391

If I understand well what's going on, when using typescript.strict: true in nuxt.config.ts, TS raises an error because all three experimental options are set to "required" instead of optional.

in nuxt.config.ts :

content: {
    experimental: {
        clientDB: true
    },
}

The error :

Type '{ clientDB: true; }' is missing the following properties from type '{ clientDB: boolean; stripQueryParameters: boolean; advanceQuery: boolean; }': stripQueryParameters, advanceQuery

Describe the bug

Here is a part of the src/module.ts file :

  experimental: {
    clientDB: boolean
    stripQueryParameters: boolean
    advanceQuery: boolean
  }

and I propose to modify like this, so no TS warning anymore :

  experimental: {
    clientDB?: boolean
    stripQueryParameters?: boolean
    advanceQuery?: boolean
  }

Additional context

No response

Logs

No response

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

No branches or pull requests

2 participants