Repository navigation
Closed
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.has workaroundA workaround has been found to avoid the problemscope: sfc
Description
Vue version
3.5.26
Link to minimal reproduction
Steps to reproduce
Define global indexed type like (typicaly in types.d.ts but not supported in https://play.vuejs.org/)
declare global {
type options = {
code: {
type: string
props: Record<string, unknown>
selected: boolean
}
}
}
- Use it anywhere to reproduce the error
What is expected?
No error just like with older versions of vue.
What is actually happening?
An error happens because global index types don't seem to be supported anymore?
System Info
| | |
| -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Operating system** | `Windows 10.0.26200` |
| **CPU** | `AMD Ryzen 9 PRO 8945HS w/ Radeon 780M Graphics (16 cores)` |
| **Node.js version** | `v24.11.1` |
| **nuxt/cli version** | `3.31.2` |
| **Package manager** | `pnpm@10.24.0` |
| **Nuxt version** | `4.2.2` |
| **Nitro version** | `2.12.9` |
| **Builder** | `vite@7.2.7` |
| **Config** | `compatibilityDate`, `css`, `devtools`, `eslint`, `experimental`, `icon`, `modules`, `routeRules`, `vite` |
| **Modules** | `@nuxt/eslint@1.12.1`, `@nuxt/ui@4.3.0`, `@nuxt/image@2.0.0`, `@nuxt/test-utils@3.21.0`, `@pinia/nuxt@0.11.3`, `@vueuse/nuxt@14.1.0`, `nuxt-charts@2.0.0` |Any additional comments?
My code base depends heavily on global indexed types. Can it be supported again just like before?
Reacted by coderabbitai
Metadata
Metadata
Assignees
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.has workaroundA workaround has been found to avoid the problemscope: sfc
Activity
coderabbitai commentedon Dec 22, 2025
📝 CodeRabbit Plan Mode
Generate an implementation plan and prompts that you can use with your favorite coding agent.
Examples
🔗 Similar Issues
Possible Duplicates
Related Issues
allowArbitraryExtensionsoption #13295🔗 Related PRs
#13789 - fix(compiler-sfc): support global augments with named exports [merged]
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord or schedule a call!
edison1105 commentedon Dec 23, 2025
Need to register global type files to the compiler, see #11014 (comment)
Rednas83 commentedon Dec 23, 2025
All types were already working except indexed types like
options['code'].Tried the suggested
globalTypeFilesbut no changenuxt.config.ts
Not sure what changed but indexed types used to work. Can you have another look at the reproduction to see how the issue can be resolved?
edison1105 commentedon Dec 24, 2025
a workaround
Rednas83 commentedon Jan 10, 2026
Seem to be resolved in my nuxt environment🚀 ...but it still happening in the Vue SFC Playground🤔