atinux / content-wind

A lightweight Nuxt theme to build a Markdown driven website. Powered by Nuxt Content, TailwindCSS and Iconify.
https://content-wind.nuxt.space
MIT License
791 stars 55 forks source link

Type of theme is not assignable in nuxt.config.ts #19

Closed hoanghadu closed 2 years ago

hoanghadu commented 2 years ago

VSCode show an error at the following lines when I open nuxt.config.ts file.

app: {
    theme: {
      meta: {
        name: 'Content Wind',
        author: 'Sebastien Chopin (@Atinux)',
        description: 'A lightweight Nuxt theme to build a Markdown driven website, based on Nuxt Content, TailwindCSS and Iconify ✨'
      }
    }
  }

The error message:

Type '{ theme: { meta: { name: string; author: string; description: string; }; }; }' is not assignable to type '{ baseURL?: string; buildAssetsDir?: string; assetsPath?: any; cdnURL?: string; head?: { [x: string]: any; charset?: string; viewport?: string; meta?: { [x: string]: any; }[]; link?: { [x: string]: any; }[]; style?: { [x: string]: any; }[]; ... 5 more ...; htmlAttrs?: { ...; }; }; }'.
  Object literal may only specify known properties, and 'theme' does not exist in type '{ baseURL?: string; buildAssetsDir?: string; assetsPath?: any; cdnURL?: string; head?: { [x: string]: any; charset?: string; viewport?: string; meta?: { [x: string]: any; }[]; link?: { [x: string]: any; }[]; style?: { [x: string]: any; }[]; ... 5 more ...; htmlAttrs?: { ...; }; }; }'.ts(2322)
index.d.ts(833, 3): The expected type comes from property 'app' which is declared here on type 'NuxtConfig'
atinux commented 2 years ago

Shall be fixed now by using the app.config.