Skip to content

[plugin:vite:vue] [@vue/compiler-sfc] Unresolvable type reference or unsupported built-in utility type #14236

@Rednas83

Description

@Rednas83

Vue version

3.5.26

Link to minimal reproduction

https://play.vuejs.org/#eNp9ksFOwzAMhl8lygmkaTvAqeomAdoBDjANboRDl3qlW5pEibsVVX13nGYt04QmVVXy+0/82U7LH6ydHmrgCU+9dKVFpjJdzAVHL/hCaGisccjaTmihc5Aqc8AKZTaZYq3QjOGPBWYslkZ7No8aY9LkkAybaEqYR1fqYtCsM9YnbA3SuDyNsQmr9V6bo6bM0eVBgUTIE7YxRkFGFEEmnP5HXzqL4HSENqciPGBtL0qRRIgxLYHmsC01rMIuPeF/Ch64Bf9a3NxeXoxQWZUh9GSpdbBo29NlXZfOghCOnNn4hDJT0m1ZTHfeaOpx35CQpbKlAvcW8wo+tkrwTClzfOk1dDVMBl1+g9z/o+98EzTBVw48uAPhjzHMXAEYw8v3V2hoPQYrk9eK3FeCa/BG1YEx2h5rnRP2ma+nfa7CG6Hxffhlg6D9UFQA7QfV+wWnh/Z0pfQ/3Lvp/TBg3v0CFs7jOg==

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
    }
  }
}
  1. Use it anywhere to reproduce the error
Image

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**  | `[email protected]`                                                                                                                                              |
| **Nuxt version**     | `4.2.2`                                                                                                                                                     |
| **Nitro version**    | `2.12.9`                                                                                                                                                    |
| **Builder**          | `[email protected]`                                                                                                                                                |
| **Config**           | `compatibilityDate`, `css`, `devtools`, `eslint`, `experimental`, `icon`, `modules`, `routeRules`, `vite`                                                   |
| **Modules**          | `@nuxt/[email protected]`, `@nuxt/[email protected]`, `@nuxt/[email protected]`, `@nuxt/[email protected]`, `@pinia/[email protected]`, `@vueuse/[email protected]`, `[email protected]`   |

Any additional comments?

My code base depends heavily on global indexed types. Can it be supported again just like before?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions