From 4dff4a02c8f6803db37672d92c30b0715ecf4c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren?= Date: Tue, 8 Sep 2026 17:09:04 +0200 Subject: [PATCH 1/2] fix(types): apply the AppConfig augmentation in apps extending the layer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `layer/app/types/index.d.ts` has imports and exports, so it is a module and its `declare module 'nuxt/schema'` block is a module augmentation — it only takes effect once something pulls the file into the program. Nothing does in an app that installs docus from npm, so every `AppConfig` field declared there is silently missing, and the app falls back to the shapes generated from `nuxt.schema.ts`. Since 5.13.0 that breaks `nuxi typecheck` in any app extending the layer, because `useSeo` reads `AppConfig['seo']['schema']` (#1433) and only `app/types/index.d.ts` declares it: node_modules/docus/app/composables/useSeo.ts(37,53): error TS2339: Property 'schema' does not exist on type '{ title?: string; description?: string; }' `index.d.ts` is already reachable — Nuxt writes a `/// ` to it into the consumer's `.nuxt/nuxt.d.ts` — so importing the types file from there is enough to make the augmentation apply. Verified with a minimal app extending a packed build of the layer: both errors disappear, `pnpm lint` and `pnpm typecheck` still pass. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01TCgqQUpt4KBXi9U9ae5iq6 --- layer/index.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/layer/index.d.ts b/layer/index.d.ts index 03ca6ee8e..8a847d080 100644 --- a/layer/index.d.ts +++ b/layer/index.d.ts @@ -1,3 +1,9 @@ +// `app/types/index.d.ts` is a module, so its `declare module 'nuxt/schema'` +// block is a module augmentation and only applies once something pulls the file +// into the program. Nuxt adds this file to a consumer's `tsconfig` via a +// `/// `, so importing it from here is what makes the AppConfig +// types reach apps extending the layer. +import type {} from './app/types' import type { AssistantModuleOptions } from './modules/assistant' export interface DocusNuxtConfig { From 8e82048e54d1baf8f7b7db28022dac7d9b9c47eb Mon Sep 17 00:00:00 2001 From: Baptiste Leproux Date: Wed, 30 Sep 2026 12:11:30 +0200 Subject: [PATCH 2/2] Update layer/index.d.ts --- layer/index.d.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/layer/index.d.ts b/layer/index.d.ts index 8a847d080..e784d3335 100644 --- a/layer/index.d.ts +++ b/layer/index.d.ts @@ -1,8 +1,4 @@ -// `app/types/index.d.ts` is a module, so its `declare module 'nuxt/schema'` -// block is a module augmentation and only applies once something pulls the file -// into the program. Nuxt adds this file to a consumer's `tsconfig` via a -// `/// `, so importing it from here is what makes the AppConfig -// types reach apps extending the layer. +// Pulls in the AppConfig augmentation for consumers (module augmentations need an import) import type {} from './app/types' import type { AssistantModuleOptions } from './modules/assistant'