nuxt / starter

Create a new Nuxt project, module, layer or start from a theme with our collection of starters.
https://nuxt.new
MIT License
436 stars 155 forks source link

fix: add Module options TypeScript to PublicRuntimeConfig #832

Closed nowo closed 1 month ago

nowo commented 1 month ago

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

When you get data from runtimeConfig, you get the type unknown image

export interface ModuleOptions {
  size?: number,
}

 _nuxt.options.runtimeConfig.public.myModule.size  // "_nuxt.options.runtimeConfig.public.myModule" is of type "unknown"

after,Able to recognize types image