module-builder
module-builder copied to clipboard
Typing ModuleOptions gives an error
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?
Are you still experiencing this?