\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_",[2936,2937,2938,2939],{"name":2891,"color":2892},{"name":2894,"color":2895},{"name":2868,"color":2869},{"name":2940,"color":2941},"upstream","E8A36D",21933,"Component appears to be untyped in template block","2023-12-12T14:36:22Z","https://github.com/nuxt/nuxt/issues/21933",0.6420996,{"description":2948,"labels":2949,"number":2954,"owner":2871,"repository":2871,"state":2882,"title":2955,"updated_at":2956,"url":2957,"score":2958},"### Environment\n\n```\r\n- Operating System: Linux\r\n- Node Version: v18.20.3\r\n- Nuxt Version: 3.13.1\r\n- CLI Version: 3.13.1\r\n- Nitro Version: 2.9.7\r\n- Package Manager: npm@10.2.3\r\n- Builder: -\r\n- User Config: compatibilityDate, devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n```\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-z6juqt?file=components%2FTest.vue\r\n\r\n`npm run typecheck` in terminal\r\n\r\n```\r\ncomponents/Test.vue:8:17 - error TS2339: Property 'optionalStr' does not exist on type 'CreateComponentPublicInstanceWithMixins\u003CToResolvedProps\u003C{}, {}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly\u003C...> & Readonly\u003C...>, ... 16 more ..., {}>'.\r\n\r\n8 \u003Cspan v-if=\"optionalStr\">{{ optionalStr }}\u003C/span>\r\n ~~~~~~~~~~~\r\n```\n\n### Describe the bug\n\nAfter upgrading from Nuxt 3.12.3 to 3.13.2, these TS errors showed up in every component that only uses optional props. The error disappears if we add a single required prop or enable TS strict mode.\n\n### Additional context\n\nThe issue doesn't seem to be present in a pure Vue/Vite project:\r\n\r\nhttps://stackblitz.com/edit/vitejs-vite-ece16d?file=src%2Fcomponents%2FHelloWorld.vue\n\n### Logs\n\n_No response_",[2950,2951],{"name":2868,"color":2869},{"name":2952,"color":2953},"possible regression","B90A42",29041,"Components with only optional props lose props type if strict mode is disabled","2024-09-23T10:12:23Z","https://github.com/nuxt/nuxt/issues/29041",0.642751,{"description":2960,"labels":2961,"number":2969,"owner":2871,"repository":2871,"state":2882,"title":2970,"updated_at":2971,"url":2972,"score":2973},"### Environment\r\n\r\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.7.4\r\n- CLI Version: 3.9.0\r\n- Nitro Version: 2.6.3\r\n- Package Manager: npm@9.4.2\r\n- Builder: -\r\n- User Config: devtools, modules, typescript\r\n- Runtime Modules: @nuxtseo/module@2.0.0-beta.15\r\n- Build Modules: -\r\n------------------------------\r\n\r\n### Reproduction\r\n\r\n- minimal changes to nuxt config adding `typeCheck: true` and `compilerOptions.noUncheckedIndexedAccess: true`\r\n\r\nhttps://stackblitz.com/edit/github-vdxk2t?file=nuxt.config.ts\r\n\r\n### Describe the bug\r\n\r\nThis highlights an issue when trying to use tsconfig features e.g. `noUncheckedIndexedAccess` or `noUnusedLocals` etc. in a nuxt project to provide stricter code conformance. Any nuxt module you have installed will also be checked for these same rules.\r\n\r\nThis effectively means you cannot use any of the tsconfig rules for the risk of a module developer not adhering to those same standards.\r\n\r\nNuxt should not be type checking any installed modules as part of build with the same tsconfig rules defined at the project level. Providing access to all tsconfig properties is misleading as they effectively don't work with the nuxt ecosystem unless you have a raw project.\r\n\r\nThe repro and logs below show how this fails for the `@nuxtseo/module` module but this error is present in a number of modules I have tried to use e.g. `content`\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n```shell-script\r\nERROR 21:54:09\r\n ERROR(vue-tsc) Type '{ icon: string; label: false; ariaLabel: string | undefined; current?: boolean | undefined; disabled?: boolean | undefined; to?: string | undefined; separator?: string | undefined; hideSeparator?: boolean | undefined; ui?: { ...; } | undefined; }' is not assignable to type 'BreadcrumbItemProps'.\r\n Types of property 'to' are incompatible.\r\n Type 'string | undefined' is not assignable to type 'string'.\r\n Type 'undefined' is not assignable to type 'string'.\r\n FILE /home/projects/github-vdxk2t/node_modules/nuxt-seo-ui/dist/runtime/components/Breadcrumb.vue:46:5\r\n\r\n 44 | }\r\n 45 | if (props.homeIcon) {\r\n > 46 | items[0] = {\r\n | ^^^^^^^^\r\n 47 | ...items[0],\r\n 48 | icon: 'material-symbols:home-outline-rounded',\r\n 49 | label: false,\r\n\r\n[vue-tsc] Found 1 error. Watching for file changes. (x3)\r\n```\r\n```\r\n",[2962,2965,2966,2967,2968],{"name":2963,"color":2964},"discussion","538de2",{"name":2891,"color":2892},{"name":2894,"color":2895},{"name":2897,"color":2898},{"name":2900,"color":2901},23609,"`typeCheck` reports errors from modules when using `tsconfig` rules","2023-11-30T07:26:56Z","https://github.com/nuxt/nuxt/issues/23609",0.64350873,{"description":2975,"labels":2976,"number":2977,"owner":2871,"repository":2881,"state":2882,"title":2978,"updated_at":2979,"url":2980,"score":2981},"The same of, but with newer version: \r\nError something on nuxt 3.1.0 - ERROR(vue-tsc) Property 'nuxtIcon' does not exist on type 'AppConfig'. #46 \r\n\r\n\r\n`node_modules/.pnpm/nuxt-icon@0.2.10/node_modules/nuxt-icon/dist/runtime/Icon.vue:34:40`\r\n------------------------------\r\n- Operating System: `Linux`\r\n- Node Version: `v18.13.0`\r\n- Nuxt Version: `3.1.2`\r\n- Nitro Version: `2.1.1`\r\n- Package Manager: `yarn@1.22.19`\r\n- Builder: `vite`\r\n- User Config: `typescript`, `ssr`, `runtimeConfig`, `app`, `modules`, `directus`, `meilisearch`\r\n- Runtime Modules: `@nuxtjs/tailwindcss@6.3.1`, `nuxt-directus@3.2.2`, `nuxt-meilisearch@0.1.7`, `nuxt-icon@0.2.10`\r\n- Build Modules: `-`\r\n------------------------------\r\n\r\nMy all packages: \r\n```\r\ndependencies:\r\n@nuxtjs/robots 3.0.0 apexcharts 3.37.0 moment 2.29.4 swiper 9.0.3 vue3-apexcharts 1.4.1 \r\n@nuxtjs/tailwindcss 6.3.1 axios 1.3.2 nuxt-directus 3.2.2 type-check 0.4.0 yarn-upgrade-all 0.7.2 \r\n@vueuse/core 9.12.0 daisyui 2.50.0 sanitize-html 2.9.0 vue-instantsearch 4.8.2 \r\n\r\ndevDependencies:\r\n@commitlint/cli 17.4.2 @typescript-eslint/parser 5.51.0 eslint-plugin-prettier 4.2.1 nuxt-icon 0.2.10 \r\n@commitlint/config-conventional 17.4.2 @vue/eslint-config-standard 8.0.1 eslint-plugin-vue 9.9.0 nuxt-meilisearch 0.1.7 \r\n@types/cypress 1.1.3 eslint 8.33.0 husky 8.0.3 prettier 2.8.3 \r\n@types/sanitize-html 2.8.0 eslint-config-prettier 8.6.0 lint-staged 13.1.0 typescript 4.9.5 \r\n@typescript-eslint/eslint-plugin 5.51.0 eslint-plugin-nuxt 4.0.0 nuxt 3.1.2 vue-tsc 1.0.24 \r\n```\r\n",[],50,"error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.","2023-03-15T16:30:19Z","https://github.com/nuxt/icon/issues/50",0.64537555,{"description":2983,"labels":2984,"number":2988,"owner":2871,"repository":2871,"state":2882,"title":2989,"updated_at":2990,"url":2991,"score":2992},"### Environment\n\n- Operating System: `Darwin`\r\n- Node Version: `v16.18.1`\r\n- Nuxt Version: `3.3.2`\r\n- Nitro Version: `2.3.2`\r\n- Package Manager: `npm@8.19.2`\r\n- Builder: `vite`\r\n- User Config: `-`\r\n- Runtime Modules: `-`\r\n- Build Modules: `-`\r\n\n\n### Reproduction\n\nhttps://github.com/niklv/nuxt-component-props-def-bug\n\n### Describe the bug\n\nFor my project config typing I need to refer to typing of component props.\r\nI try extract props typing in this way. But looks like there are no props typing at all.\r\n```vue\r\n\u003Cscript lang=\"ts\" setup>\r\n// ComponentA.vue\r\nconst {propA} = defineProps\u003C{\r\n propA: string\r\n}>()\r\n\u003C/script>\r\n\r\n\u003Ctemplate>\r\n \u003Cdiv v-text=\"propA\" />\r\n\u003C/template>\r\n\r\n```\r\n\r\n```ts\r\n// config.ts\r\nimport type {ComponentA} from \"#components\";\r\nimport {ComponentOptionsBase} from \"@vue/runtime-core\";\r\n\r\n\r\ntype ComponentProps\u003CT> = T extends ComponentOptionsBase\u003Cinfer P, // Props\r\n any, // RawBindings\r\n any, // D\r\n any, // C\r\n any, // M\r\n any, // Mixin\r\n any, // Extends\r\n any> ? unknown extends P ? {} : P : {};\r\n\r\n\r\ntype CompAProps = ComponentProps\u003Ctypeof ComponentA>\r\n\r\n\r\nconst someConfig:CompAProps = {\r\n // @ts-expect-error\r\n notExistedProp: true // should be error\r\n}\r\n```\n\n### Additional context\n\n\r\n\r\nThere are must be some props typing in first generic argument of `DefineComponent`\n\n### Logs\n\n_No response_",[2985,2986,2987],{"name":2891,"color":2892},{"name":2894,"color":2895},{"name":2940,"color":2941},20010,"Empty global components props typings","2023-10-22T09:01:34Z","https://github.com/nuxt/nuxt/issues/20010",0.6461469,["Reactive",2994],{},["Set"],["ShallowReactive",2997],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fU7LgyjdFw8yg3Gb4dlDqwbPDK0JOvSJjlfYIAotX3T0":-1},"/nuxt/nuxt/25874"]