NuxtN
Nuxtβ€’9mo ago
Cesxhin

How export interfaces after build module?

Recently I no longer export my interfaces to the types.d.ts file that gets generated during module build.

Example (module.ts):

export interface structureModel {
  name: string,
  surname: string,
  age: number
}

export default defineNuxtModule({..});


In the types.d.ts file after it was built, it used to look like this:
import type { NuxtModule } from '@nuxt/schema'

import type { default as Module } from './module'

export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>

export { type structureModel, default } from './module'

and now it looks like this
import type { NuxtModule } from '@nuxt/schema'

import type { default as Module } from './module'

export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>

export { default } from './module' //<-- missing structureModel, where?
Was this page helpful?