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

Typing ModuleOptions gives an error #73

Open
silverbackdan opened this issue Dec 5, 2022 · 1 comment
Open

Typing ModuleOptions gives an error #73

silverbackdan opened this issue Dec 5, 2022 · 1 comment

Comments

@silverbackdan
Copy link

silverbackdan commented Dec 5, 2022

I'm working my way through with Typescript and a bit of a newbie but I can't seem to figure out when developing a new Nuxt 3 module why I type a Typscript error in my nuxt.config.ts where I include my module.

export default defineNuxtConfig({
  modules: [
    CwaModule // < -- HERE
  ]
})
Type 'NuxtModule<CwaModuleOptions>' is not assignable to type 'string | NuxtModule<ModuleOptions> | [(string | NuxtModule<ModuleOptions> | undefined)?, ({ [x: string]: any; } | undefined)?] | undefined'

This is the same when starting a brand new module using this builder except I have altered the ModuleOptions interface name for my module

It's quite a simple setup and definition here
https://github.com/components-web-app/cwa-nuxt-module/blob/nuxt3/src/module.ts

Is there something I'm missing.. or expected?

@danielroe
Copy link
Member

Are you still experiencing this?

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