Skip to content

Declaring module 'nuxt/schema' makes 'ui' property required instead of optional #6791

Description

@fkwww27

Environment

Operating system Linux 6.6.87.2-microsoft-standard-WSL2
CPU 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz (16 cores)
Node.js version v22.22.2
nuxt/cli version 3.37.0
Package manager npm@10.9.7
Nuxt version 4.5.1
Nitro version 2.13.4
Builder vite@8.2.0
Config compatibilityDate, css, devServer, devtools, modules
Modules @nuxt/ui@4.10.0

Is this bug related to Nuxt or Vue?

Nuxt

Package

v4.x

Version

v.4.10.0

Reproduction

  1. You need to add into app folder, file {anything}.d.ts.
  2. Add the following code:
declare module "nuxt/schema" {
  interface AppConfigInput {}
}

export {};
  1. Observe that the ui property in app.config.ts becomes required.

Description

Without a .d.ts file, the ui property is optional:

Image

After adding a .d.ts file that augments nuxt/schema, the ui property becomes required:

Image

Expected behavior

The ui property should remain optional after augmenting nuxt/schema.

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    triageAwaiting initial review and prioritization

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions