\r\n \u003C/div>\r\n\u003C/template>\r\n\u003Cscript setup lang=\"ts\">\r\nwithDefaults(\r\n defineProps\u003C{\r\n variant: \"fill\" | \"ghost\";\r\n }>(),\r\n { variant: \"fill\" }\r\n);\r\n\u003C/script>\r\n```\r\n\r\n`~/.nuxt/components.d.ts`\r\n\r\n```TypeScript\r\ndeclare module 'vue' {\r\n export interface GlobalComponents {\r\n //...\r\n 'MyButton': typeof import(\"../../src/runtime/components/MyButton.vue\")['default']\r\n //...\r\n }\r\n}\r\n\r\nexport const MyButton: typeof import(\"../../src/runtime/components/MyButton.vue\")['default']\r\n\r\nexport const componentNames: string[]\r\n```\r\n\r\n\r\n### Correct Intellisense\r\n\r\nVsCode popopver hovering `'MyButton'` in `~/.nuxt/components.d.ts`\r\n\r\n```TypeScript\r\n(property) GlobalComponents['MyButton']: __VLS_WithTemplateSlots\u003CDefineComponent\u003C{\r\n variant: {\r\n type: PropType\u003C\"fill\" | \"ghost\">;\r\n required: true;\r\n default: string;\r\n };\r\n}, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, ... 5 more ..., {}>, {\r\n ...;\r\n}>\r\n````\r\n\r\n### Wrong Intellisense\r\n\r\nVsCode popopver hovering `\u003CMyButton />` in the template block of `~/app.vue` (or any other template)\r\n\r\n```TypeScript\r\n(property) 'MyButton': DefineComponent\u003C{}, {}, any>\r\n```\r\n\r\n### Additional context\r\n\r\nThe above example is the current state of the reproduction repo. But a different, but similar behavior happened in other reports (for example a yarn workspace repo). Strange enough, sometimes, it works fine...\r\n\r\n### Logs\r\n\r\n_No response_",[2886,2889,2890,2891],{"name":2887,"color":2888},"types","2875C3",{"name":2868,"color":2869},{"name":2871,"color":2872},{"name":2892,"color":2893},"upstream","E8A36D",21933,"Component appears to be untyped in template block","2023-12-12T14:36:22Z","https://github.com/nuxt/nuxt/issues/21933",0.63425916,{"description":2900,"labels":2901,"number":2910,"owner":2877,"repository":2877,"state":2878,"title":2911,"updated_at":2912,"url":2913,"score":2914},"### Environment\n\n- Operating System: Windows_NT\n- Node Version: v18.16.0\n- Nuxt Version: 3.4.3\n- Nitro Version: 2.4.0\n- Package Manager: pnpm@8.5.0\n- Builder: vite\n- User Config: experimental, modules, colorMode\n- Runtime Modules: @unocss/nuxt@0.51.12, @vueuse/nuxt@10.1.2, nuxt-icon@0.4.0, nuxt-swiper@1.1.0, @nuxt/devtools@0.4.6, @nuxt/image-edge@1.0.0-28020728.5df24eb, @nuxtjs/color-mode@3.2.0\n- Build Modules: -\n\n### Reproduction\n\n\n\nThis error doesn't seem to be reproducible on Stackblitz so I have included a [github repo](https://github.com/tobychidi/nuxt-utils-import-error)\n\n### Describe the bug\n\nWhen functions are auto-imported from utils/ composables and used in Vue SFC Template, VsCode throws and error. Yes, I use the latest volar. This error appeared after `pnpm up` That bumped my Vue version to 3.3.1.\n\nI have not tried reverting Vue versions though. \n\n### Additional context\n\nExample: \n```\nProperty 'useShowSnack' does not exist on type '{ $: ComponentInternalInstance; $data: {}; $props: { key?: string | number | symbol | undefined; ref?: VNodeRef | undefined; ref_for?: boolean | undefined; ... 8 more ...; style?: unknown; }; ... 10 more ...; $watch\u003CT extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (arg...'.ts(2339)\n```\n\n_No response_\n\n### Logs\n\n_No response_",[2902,2903,2906,2907],{"name":2868,"color":2869},{"name":2904,"color":2905},"workaround available","11376d",{"name":2892,"color":2893},{"name":2908,"color":2909},"upstream-bug","B60205",20827,"TS Error with auto-imports from composables and utils in Vue Template after 3.3","2024-11-07T20:13:37Z","https://github.com/nuxt/nuxt/issues/20827",0.6379969,{"description":2916,"labels":2917,"number":2928,"owner":2877,"repository":2877,"state":2878,"title":2929,"updated_at":2930,"url":2931,"score":2932},"### Environment\r\n\r\n- Operating System: `Darwin`\r\n- Node Version: `v18.17.1`\r\n- Nuxt Version: `3.8.2`\r\n- CLI Version: `3.10.0`\r\n- Nitro Version: `2.8.0`\r\n- Package Manager: `npm@9.6.7`\r\n- Builder: `-`\r\n- User Config: `devtools`, `imports`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\r\n\r\n### Reproduction\r\n\r\n1. go to https://github.com/DawidKopys/nuxt-props-with-global-types/ and clone this repo\r\n2. `npm i`\r\n3. `npm run type-check`\r\n\r\n**Expected result**: we get typescript error in App.vue in place of using CompUsingGlobalType1 as we are passing number instead of string to its prop foo.bar.\r\n\r\n**Actual result**: there is no typescript error in above place.\r\n\r\n### Describe the bug\r\n\r\nFirst of all, let me thank all of the people involved in developing Nuxt. You are doing a great job creating this awesome piece of software!\r\n\r\nNow back to the issue:\r\nIt seems that types auto imported by Nuxt can't be used for defining components' props (without importing them explicitly, for example from `#imports`). In fact it's even worse - they can be used, we don't get any ts errors, it just doesn't seem to work. It looks that it fails silently.\r\n\r\nWhat is more, it also presents that globally available types can be used for defining props, just not if they are made available globally the way it is currently done in Nuxt.\r\n\r\nTo keep it brief:\r\n- global types added to the global scope in the way Nuxt does that don't work when used for defining vue components' props. It seems that Nuxt is generating something alike below snippet inside `.nuxt/types/imports.d.ts`\r\n```typescript\r\ndeclare global {\r\n // @ts-ignore\r\n export type { GlobalExternalType1 } from './GlobalExternalType1'\r\n}\r\n\r\n```\r\n- it seems that it could work, if Nuxt was generating something like below instead:\r\n```typescript\r\ndeclare global {\r\n interface GlobalExternalType2 {\r\n bar: string\r\n }\r\n}\r\n```\r\nIt would possibly require to copy over entire types' declarations in order to do that. But maybe it wouldn't be a problem since TypeScript is a structural type system and when comparing types, TypeScript only takes into account the members on the type.\r\n\r\n\r\n### Additional context\r\n\r\nFor additional info see https://github.com/DawidKopys/vue-props-with-global-types#readme as well. The same issue but with plain vue project, without Nuxt.\r\n\r\n### Logs\r\n\r\n_No response_",[2918,2921,2922,2925],{"name":2919,"color":2920},"enhancement","8DEF37",{"name":2868,"color":2869},{"name":2923,"color":2924},"bug","d73a4a",{"name":2926,"color":2927},"🍰 p2-nice-to-have","0E8A16",24412,"Types auto imported by Nuxt can't be used for defining components' props","2024-03-28T19:37:47Z","https://github.com/nuxt/nuxt/issues/24412",0.6544935,{"description":2934,"labels":2935,"number":2939,"owner":2877,"repository":2877,"state":2878,"title":2940,"updated_at":2941,"url":2942,"score":2943},"### Environment\n\n------------------------------\r\n- Operating System: `Windows_NT`\r\n- Node Version: `v16.16.0`\r\n- Nuxt Version: `3.2.3`\r\n- Nitro Version: `2.2.3`\r\n- Package Manager: `npm@9.4.0`\r\n- Builder: `vite`\r\n- User Config: `alias`, `app`, `build`, `imports`, `modules`, `naiveUI`, `ssr`, `supabase`, `runtimeConfig`, `tailwindcss`, `typescript`\r\n- Runtime Modules: `@vueuse/nuxt@9.13.0`, `@nuxtjs/tailwindcss@6.4.1`, `@pinia/nuxt@0.4.7`, `@nuxtjs/critters@0.4.0`, `@nuxtjs/fontaine@0.2.4`, `@nuxtjs/google-fonts@3.0.0-1`, `@nuxt/image-edge@1.0.0-27954023.4cee565`, `nuxt-headlessui@1.1.1`, `@nuxtjs/supabase@0.3.1`, `@formkit/nuxt@1.0.0-beta.15`, `@huntersofbook/naive-ui-nuxt@0.7.1` \r\n- Build Modules: `-`\n\n### Reproduction\n\nI am sorry to open this without a reproduction, but I simply cannot reproduce this. It happens in a specific repo, and I have tried thousands of things, though cannot find what causes the issue. \r\n\r\nI am opening this issue so that people can weigh in and if there are others experiencing this, they can use the hack I've found (see below).\n\n### Describe the bug\n\nAuto import of my components work great. But their types are not recognized in VS Code. Whenever I hover over a component in the `\u003Ctemplate>` section of an SFC, its type is indicated as `any`. \r\n\r\nIt is very weird but I've found a hack: When I reference the `.nuxt/components` path anywhere in the project, the types start working. So I added this line to my `app.vue` file:\r\n\r\n```\r\nimport {} from \".nuxt/components\";\r\n``` \r\n\r\nI think something is causing Nuxt to ignore the `.nuxt/components` path but when I reference it somewhere, Nuxt starts recognizing it back.\r\n\r\nI'd be forever grateful if someone knows what is going on here and suggest where to look.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[2936,2937,2938],{"name":2868,"color":2869},{"name":2871,"color":2872},{"name":2874,"color":2875},19427,"Auto imported component types do not work","2023-03-08T08:40:06Z","https://github.com/nuxt/nuxt/issues/19427",0.65488094,{"labels":2945,"number":2950,"owner":2877,"repository":2877,"state":2878,"title":2951,"updated_at":2952,"url":2953,"score":2954},[2946,2947],{"name":2871,"color":2872},{"name":2948,"color":2949},"2.x","d4c5f9",7899,"TypeScript breaks when the Nuxt application is placed in a sub-folder","2023-01-22T15:36:07Z","https://github.com/nuxt/nuxt/issues/7899",0.65910244,{"labels":2956,"number":2962,"owner":2877,"repository":2877,"state":2878,"title":2963,"updated_at":2964,"url":2965,"score":2966},[2957,2958,2959],{"name":2868,"color":2869},{"name":2871,"color":2872},{"name":2960,"color":2961},"needs details","493824",13409,"composables autoimport not updating after change","2023-01-19T16:55:00Z","https://github.com/nuxt/nuxt/issues/13409",0.65953475,{"description":2968,"labels":2969,"number":2974,"owner":2877,"repository":2877,"state":2878,"title":2975,"updated_at":2976,"url":2977,"score":2978},"### Describe the feature\n\n# vueCompilerOptions in nuxt.config.ts\r\n\r\nCurrently, the `defineNuxtConfig`'s `typescript.tsConfig.vueCompilerOptions` property is not officially supported on type-level: the compiler will yell at you if you try to use it.\r\nHowever, the configuration options defined in `vueCompilerOptions` still work as intended.\r\n\r\nEnhancing the `tsConfig` interface locally to include the `vueCompilerOptions` property is a possible workaround (the `VueCompilerOptions` type is currently available and exported from vue's languageModule), but an official solution would be much appreciated.\r\n\r\nYou can find this reproduction [on stackblitz](https://stackblitz.com/edit/github-58xcrx?file=README.md)\r\n\r\n### Prerequisites\r\n\r\n- A minimal Nuxt app started with `npx nuxi@latest init`\r\n- `vue-tsc` and `typescript` installed as dev dependencies (see [Nuxt's TypeScript documentation](https://nuxt.com/docs/guide/concepts/typescript#type-checking))\r\n- A `nuxt.config.ts` file with the `vueCompilerOptions` property added to the `tsConfig` property. To observe the behavior, the easiest way is to add the `strictTemplates` property to the `vueCompilerOptions` object.\r\n\r\n### Steps to reproduce\r\n\r\n1. Create a component and define a prop in the component using the `defineProps` macro and passing it the `Props` type argument\r\n2. Use your new component in a page and pass it the prop you defined (this is not really necessary, but it's a good way to observe the behavior)\r\n3. Pass your component a prop that is not defined in the component's `props`, (e.g. `:nonExistentProp=\"true\"`)\r\n4. Save and run `npx nuxi typecheck`. You l'll get one error from the `nuxt.config.ts` file, saying that the `vueCompilerOptions` property is not allowed, and one from the page where you used the component, saying that `non-existent-prop` is not defined in the component's `Props` type.\r\n\n\n### Additional information\n\n- [X] Would you be willing to help implement this feature?\n- [ ] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://nuxt.com/docs/community/contribution).\n- [X] Check existing [discussions](https://github.com/nuxt/nuxt/discussions) and [issues](https://github.com/nuxt/nuxt/issues).",[2970,2971,2972],{"name":2887,"color":2888},{"name":2868,"color":2869},{"name":2973,"color":2875},"🔨 p3-minor",25874,"'vueCompilerOptions' does not exist in type 'tsConfig' in 'defineNuxtConfig'","2024-02-27T15:31:48Z","https://github.com/nuxt/nuxt/issues/25874",0.65966886,{"description":2980,"labels":2981,"number":2984,"owner":2877,"repository":2877,"state":2878,"title":2985,"updated_at":2986,"url":2987,"score":2988},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.17.0\r\n- Nuxt Version: 3.12.4\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.7\r\n- Package Manager: npm@9.6.6\r\n- Builder: -\r\n- User Config: devtools, typescript, vue, modules, i18n, quasar, site, nitro, routeRules, sitemap, runtimeConfig, css, security\r\n- Runtime Modules: @nuxtjs/i18n@8.3.1, @pinia/nuxt@0.5.1, @pinia-plugin-persistedstate/nuxt@1.2.0, @nuxtjs/seo@2.0.0-rc.10, nuxt-quasar-ui@2.1.2, nuxt-security@2.0.0-rc.9\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\nit looks like auto import is not working\r\n\r\n\r\n### Describe the bug\r\n\r\nif i upgrade vue-tsc version,\r\n\r\ni can't npm run build or dev\r\n\r\nbecause I encounter errors with composable... etc.\r\n\r\n\r\n\r\n\r\n`components/recruit/Table.vue:29:11 - error TS2339: Property 'convertUnixtoYMD' does not exist on type 'CreateComponentPublicInstance\u003CReadonly\u003CExtractPropTypes\u003C__VLS_TypePropsToOption\u003C{ searchStr: string; data: RecruitList[]; }>>>, {}, unknown, ... 16 more ..., {}>'.\r\n\r\n29 convertUnixtoYMD(item.endTime)\r\n ~~~~~~~~~~~~~~~~\r\n`\r\n`components/solution/Intro.vue:40:21 - error TS2339: Property 'navigateTo' does not exist on type 'CreateComponentPublicInstance\u003CReadonly\u003CExtractPropTypes\u003C__VLS_TypePropsToOption\u003C{ data: Res_Solution; }>>>, { t: ComposerTranslation\u003C{ [x: string]: LocaleMessage\u003CVueMessageType>; }, ... 4 more ..., string>; }, ... 17 more ..., {}>'.\r\n\r\n40 @click=\"navigateTo({ path: '/customer/brochure' })\"\r\n ~~~~~~~~~~\r\n`\r\n\r\nit looks like auto import is not working\r\n\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[2982,2983],{"name":2871,"color":2872},{"name":2874,"color":2875},28440,"error with vue-tsc 2.0.29","2024-08-09T14:28:00Z","https://github.com/nuxt/nuxt/issues/28440",0.6596802,{"description":2990,"labels":2991,"number":2994,"owner":2877,"repository":2877,"state":2878,"title":2995,"updated_at":2996,"url":2997,"score":2998},"### Versions\r\n\r\n- nuxt: 2.15.3\r\n- node: v14.16.0\r\n\r\n### Reproduction\r\n\r\nI set up a fresh installation of Nuxt today for a project. I use the above mentioned version with Typescript.\r\n\r\nThen I created the component below and created a constant there in the data() method using a constant declaration and also assigned a type to it, as well as returned it via the return object. \r\n\r\nWhen running `npm run dev` I got the following error message, which I can't understand. Because I wrote the same thing in another project with an older Nuxt version and it could be executed.\r\n\r\n```bash\r\n✔ Builder initialized 21:42:22\r\n✔ Nuxt files generated 21:42:22\r\n\r\n✖ Client\r\n Compiled with some errors in 5.93s\r\n\r\n\r\n ERROR Failed to compile with 1 errors friendly-errors 21:42:29\r\n\r\n\r\n ERROR in ./components/form.vue?vue&type=script&lang=ts& friendly-errors 21:42:29\r\n\r\nModule parse failed: Unexpected token (29:17) friendly-errors 21:42:29\r\nFile was processed with these loaders:\r\n * ./node_modules/vue-loader/lib/index.js\r\nYou may need an additional loader to handle the result of these loaders.\r\n| export default Vue.extend({\r\n| data() {\r\n> const taxable: Taxable | null = null\r\n| \r\n| return {\r\n friendly-errors 21:42:29\r\n @ ./components/form.vue?vue&type=script&lang=ts& 1:0-116 1:132-135 1:137-250 1:137-250\r\n @ ./components/form.vue\r\n @ ./.nuxt/components/plugin.js\r\n @ ./.nuxt/index.js\r\n @ ./.nuxt/client.js\r\n @ multi ./node_modules/eventsource-polyfill/dist/browserify-eventsource.js (webpack)-hot-middleware/client.js?reload=true&timeout=30000&ansiColors=&overlayStyles=&path=%2F__webpack_hmr%2Fclient&name=client ./.nuxt/client.js\r\n friendly-errors 21:42:29\r\nℹ Waiting for file changes 21:42:29\r\nℹ Memory usage: 201 MB (RSS: 317 MB) 21:42:29\r\nℹ Listening on: http://localhost:3000/ 21:42:29\r\n```\r\n\r\n\r\n### Steps to reproduce\r\nI have created this SFC.\r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003Csection class=\"relative w-full h-auto py-8\">\r\n \u003C!-- some html stuff - not interested! -->\r\n \u003C/section>\r\n\u003C/template>\r\n\r\n\u003Cscript lang=\"ts\">\r\nimport Vue from 'vue'\r\nimport { Taxable } from '~/interfaces/index' // return a valid typescript interface\r\n\r\nexport default Vue.extend({\r\n data() {\r\n const taxable: Taxable | null = null\r\n\r\n return {\r\n taxable,\r\n }\r\n }\r\n})\r\n\u003C/script>\r\n\r\n\u003Cstyle lang=\"scss\">\r\n// some styling\r\n\u003C/style>\r\n```\r\n\r\n### What is Expected?\r\nI expect this to compile correctly and launch the app.\r\n\r\n### What is actually happening?\r\nBuild aborts.",[2992,2993],{"name":2871,"color":2872},{"name":2948,"color":2949},9047,"Nuxt build aborts on const declaration in data() - Typescript","2023-01-22T15:38:48Z","https://github.com/nuxt/nuxt/issues/9047",0.6652202,["Reactive",3000],{},["Set"],["ShallowReactive",3003],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fryVhqlwbXoSVu8vs_C3U5LGfmNKcPUSS8NpNNt1ycbc":-1},"/nuxt/nuxt/28707"]