\r\n\u003C/div>\r\n\u003C/template>\r\n\r\n\u003Cscript setup>\r\ndefineProps({ icon: String })\r\n\u003C/script>\r\n```",[],174,"icon","closed","Can the Base component be changed to \"NuxtIcon\" instead of \"Icon\" with the \"name\" attribute?","2024-06-26T16:45:07Z","https://github.com/nuxt/icon/issues/174",0.6617143,{"description":3049,"labels":3050,"number":3051,"owner":3031,"repository":3042,"state":3043,"title":3052,"updated_at":3053,"url":3054,"score":3055},"Although it looks redundant, Iconify uses `\u003CIcon icon=\"...\" />` as the Vue component. Since this module uses Iconify, why not keeping the same structure so we can just copy the component from their lib? An alias prop would be welcomed if I'm sounding too radical 😋 That way we can use both `name` and `icon`.",[],51,"[question] Why not using `icon` as a prop instead of `name`?","2023-02-16T15:53:34Z","https://github.com/nuxt/icon/issues/51",0.6731204,{"description":3057,"labels":3058,"number":3071,"owner":3031,"repository":3031,"state":3043,"title":3072,"updated_at":3073,"url":3074,"score":3075},"### Environment\r\n\r\n- Operating System: Darwin\r\n- Node Version: v18.14.0\r\n- Nuxt Version: 3.6.1\r\n- Nitro Version: 2.5.2\r\n- Package Manager: yarn@1.22.19\r\n- Builder: vite\r\n- User Config: -\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n**VsCode 1.79.2**\r\n- vscode.typescript-language-features: disabled\r\n- Vue.volar: 1.8.3, enabled\r\n- Vue.vscode-typescript-vue-plugin: 1.8.3, enabled\r\n\r\n### Reproduction\r\n\r\nhttps://github.com/niklas-may/nuxt-module-issue-reproduction\r\n\r\n### Describe the bug\r\n\r\n**Preface**\r\n_Thank you for your amazing work on Nuxt! I am not sure where this issue is best raised, Nuxt, VsCode or Vue. But due to the special typescript tooling with auto imports, I thought it's best to start here, and would be happy to hear if anybody observed a similar behaviour or has a solution._ \r\n\r\n**Description**\r\nWhen I open `~/.nuxt/components.d.ts` in VsCode and hover over an imported component, VsCode IntelliSense popover displays the correct types for this component.\r\nBut when I use the component in any other components template block, for example `~/app.vue`, the typing is missing the prop types.\r\n\r\n### Component and Type Definitions\r\n\r\n`~/../src/runtime/MyButton.vue`\r\n\r\n```vue\r\n\u003Ctemplate>\r\n \u003Cdiv style=\"border: 1px solid pink\">\r\n \u003Cslot />\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_",[3059,3062,3065,3068],{"name":3060,"color":3061},"types","2875C3",{"name":3063,"color":3064},"3.x","29bc7f",{"name":3066,"color":3067},"pending triage","E99695",{"name":3069,"color":3070},"upstream","E8A36D",21933,"Component appears to be untyped in template block","2023-12-12T14:36:22Z","https://github.com/nuxt/nuxt/issues/21933",0.6842405,{"description":3077,"labels":3078,"number":3079,"owner":3031,"repository":3042,"state":3043,"title":3080,"updated_at":3081,"url":3082,"score":3083},"Nuxt-icon: 0.4.2\r\nNuxt: 3.6.5\r\n\r\nnode_modules/nuxt-icon/dist/runtime/Icon.vue:29:33 - error TS7053: Element implicitly has an 'any' type because expression of type 'string & {}' can't be used to index type '{}'.\r\n\r\n29 const iconName = computed(() => (appConfig.nuxtIcon?.aliases || {})[props.name] || props.name)\r\n",[],92,"Typescript error","2023-08-07T12:39:25Z","https://github.com/nuxt/icon/issues/92",0.6864772,{"description":3085,"labels":3086,"number":3096,"owner":3031,"repository":3031,"state":3043,"title":3097,"updated_at":3098,"url":3099,"score":3100},"### Describe the feature\n\nHi, I'm not sure if this is a feature request or just a question, but I didn't find any related issues / docs.\r\n\r\n**Context:** \r\n\r\nI have an ESLint configuration and it contains rules [`no-undef`](https://eslint.org/docs/latest/rules/no-undef) and [`vue/no-undef-components`](https://eslint.vuejs.org/rules/no-undef-components.html) that report undeclared functions/variables/components.\r\n\r\n\r\n\r\nNuxt automatically imports many things and I like it, I don't want to import them explicitly.\r\n[This is slightly related issue](https://github.com/nuxt/nuxt.js/issues/13413), but I don't need to import them explicitly, I need an option to retrieve a **names** of all auto-imported components/functions to declare them as global in `.eslintrc` file.\r\n\r\n**My current workaround** is define them manually and declare as global like that:\r\n\r\n\r\n\r\nAlthough this is a working solution, there are some limitations:\r\n- It needs to be filled manually\r\n- It doesn't update automatically if I register a new module that adds a global component (such as `@nuxt/image`) or new composables (such as `@vueuse/nuxt`)\r\n- It doesn't update if I set custom dirs to import in `nuxt.config.ts` via `imports.dirs` and create a new file inside it.\r\n- It doesn't update if new release of Vue/Nuxt includes a new features\r\n\r\nSo, a lot of manual work every time something was changed.\r\nThis can be done using custom module, but I believe it should be done by Nuxt itself.\r\n\r\n**Feature request:**\r\n\r\nExpose an auto-imported functions / components names to allow import them and mark as global in `.eslintrc`\r\n\r\n\r\n\r\n**Additional info**\r\n\r\nI know it's recommended to disable `no-undef` for TypeScript at all, but currently, as far I know, there is no robust way to separate `\u003Cscript lang=\"ts\">` and `\u003Cscript>` in ESLint confgurations for `.vue` files. \r\n\r\nAlso Nuxt isn't only TypeScript framework. and global components still needs to be configured\n\n### Additional information\n\n- [X] Would you be willing to help implement this feature?\n- [X] Could this feature be implemented as a module?\n\n### Final checks\n\n- [X] Read the [contribution guide](https://v3.nuxtjs.org/community/contribution).\n- [X] Check existing [discussions](https://github.com/nuxt/framework/discussions) and [issues](https://github.com/nuxt/framework/issues).",[3087,3089,3092,3093],{"name":3020,"color":3088},"8DEF37",{"name":3090,"color":3091},"good first issue","fbca04",{"name":3063,"color":3064},{"name":3094,"color":3095},"🍰 p2-nice-to-have","0E8A16",15015,"Retrieve auto-imported component / function names","2024-03-13T22:57:05Z","https://github.com/nuxt/nuxt/issues/15015",0.69667304,{"description":3102,"labels":3103,"number":3104,"owner":3031,"repository":3042,"state":3043,"title":3105,"updated_at":3106,"url":3107,"score":3108},"##error message\r\n\r\n ERROR(vue-tsc) Property 'nuxtIcon' does not exist on type 'AppConfig'.\r\nconst props = defineProps({\r\n name: {\r\n type: String as PropType\u003Ckeyof AppConfig['nuxtIcon']['aliases'] | (string & {})>,\r\n ^^^^^^^^^^\r\n required: true\r\n },\r\n\r\n##code\r\n\r\n```ts\r\n\r\nexport default defineNuxtConfig({\r\n srcDir: 'src',\r\n ssr: false,\r\n typescript: {\r\n typeCheck: true\r\n },\r\n modules: ['@nuxtjs/tailwindcss', 'nuxt-icon']\r\n\r\n})\r\n```",[],46,"Error something on nuxt 3.1.0 - ERROR(vue-tsc) Property 'nuxtIcon' does not exist on type 'AppConfig'.","2023-01-27T14:11:31Z","https://github.com/nuxt/icon/issues/46",0.69821507,{"description":3110,"labels":3111,"number":3116,"owner":3031,"repository":3031,"state":3043,"title":3117,"updated_at":3118,"url":3119,"score":3120},"### What problem does this feature solve?\r\n\r\nDeveloping with both Nuxt & TypeScript, I lately have been likely frustrated using the Nuxt API around pages using TypeScript decorators, so here is what I want to suggest :\r\n\r\nProvide Nuxt TypeDefs to be able to use (and get AutoCompletion on) the Nuxt Pages API (https://nuxtjs.org/api/ => \"Pages\") around TypeScript decorators for class-style Vue component (`vue-class-component` https://github.com/vuejs/vue-class-component ).\r\n\r\nExample (Autocompletion on `head` API property through MetaInfo typedef of `vue-meta`): \r\n\r\n\r\n\r\n\r\n`nuxt-class-component` would be not needed anymore, unless you want to put your Nuxt logic in your `export default class` without Editor Autocompletion and having trouble with TypeScript implict any !\r\n\r\n### What does the proposed changes look like?\r\n\r\nFor now I ended up with these definitions, according the official Nuxt API Documentation:\r\n\r\n\r\n\r\nAs you may have figured out, `Context` is declared as `any` type, it's just a question of time to define it properly according to Nuxt API Context (https://nuxtjs.org/api/context ).\r\n\r\nI would need to know if what I did is relevant, I heard about `types` which were maybe present on 1.x but disappeared since 2.x release (#795), so I wasn't sure if my work might have already been done somewhere, maybe it was about another type of types ?\r\n\r\nThen I'll be glad to finish my work and propose a PR.\r\n\r\n\r\n\r\n\u003C!--cmty-->\r\n\u003Cdiv align=\"right\">\u003Csub>\u003Cem>This feature request is available on \u003Ca href=\"https://cmty.app/nuxt\">Nuxt\u003C/a> community (\u003Ca href=\"https://cmty.app/nuxt/nuxt.js/issues/c7907\">#c7907\u003C/a>)\u003C/em>\u003C/sub>\u003C/div>",[3112,3113],{"name":3020,"color":3088},{"name":3114,"color":3115},"2.x","d4c5f9",4050,"TypeScript TypeDefs Suggestion for Nuxt 2.x","2023-01-22T15:50:48Z","https://github.com/nuxt/nuxt/issues/4050",0.69864166,{"labels":3122,"number":3124,"owner":3031,"repository":3031,"state":3043,"title":3125,"updated_at":3126,"url":3127,"score":3128},[3123],{"name":3114,"color":3115},4134,"TS2314: Generic type 'ComponentOptions\u003CV>' requires 1 type argument(s).","2023-01-18T20:03:58Z","https://github.com/nuxt/nuxt/issues/4134",0.69874585,{"description":3130,"labels":3131,"number":3134,"owner":3031,"repository":3031,"state":3043,"title":3135,"updated_at":3136,"url":3137,"score":3138},"Not sure if this belongs here. Feels like it doesn't belong in the Nuxt repo either, because it's module specific. Let me know if I need to move it.\r\n\r\nSo my situation is the following. I'm further improving my [Nuxt-vuetify module](https://github.com/invictus-codes/nuxt-vuetify). Users of the module, will provide a Vuetify config through the Nuxt.config.ts. Now Vuetify has the following feature when it comes to icons, [fa-svg](https://vuetifyjs.com/en/features/icon-fonts/#font-awesome-svg-icons). To use this feature, you need to provide a function as iconSet (component). This is how it works, I cannot change this. However, this is not the cause of my \"issue\".\r\n\r\nWhat I can't seem to get working is the following, tested it on the nuxt-module-starter:\r\n\r\nIn my Nuxt.config.ts:\r\n```typescript\r\nexport default defineNuxtConfig({\r\n modules: [\"../src/module\"],\r\n myModule: {\r\n testViaConfig() {\r\n console.log(\"test\");\r\n return \"test\";\r\n },\r\n },\r\n});\r\n```\r\n\r\nin my module.ts:\r\n```typescript\r\nimport { defineNuxtModule, addPlugin, createResolver } from \"@nuxt/kit\";\r\n\r\n// Module options TypeScript interface definition\r\nexport interface ModuleOptions {}\r\n\r\nexport default defineNuxtModule\u003CModuleOptions>({\r\n meta: {\r\n name: \"my-module\",\r\n configKey: \"myModule\",\r\n },\r\n // Default configuration options of the Nuxt module\r\n defaults: {},\r\n setup(options, nuxt) {\r\n const resolver = createResolver(import.meta.url);\r\n\r\n nuxt.options.runtimeConfig.public.myModule = {\r\n ...options,\r\n test: \"runtimeConfig, check\",\r\n testViaModule: () => {\r\n console.log(\"test\");\r\n return \"test\";\r\n },\r\n };\r\n // Do not add the extension since the `.ts` will be transpiled to `.mjs` after `npm run prepack`\r\n addPlugin(resolver.resolve(\"./runtime/plugin\"));\r\n },\r\n});\r\n```\r\n\r\nIn my runtime/plugin.ts:\r\n```typescript\r\nimport { defineNuxtPlugin, useRuntimeConfig } from \"#app\";\r\n\r\nexport default defineNuxtPlugin((nuxtApp) => {\r\n const config = useRuntimeConfig();\r\n const options = config.public.myModule;\r\n console.log({ options });\r\n console.log(\"Plugin injected by my-module!\");\r\n});\r\n```\r\n\r\nI would expect that in the browser both the `testViaConfig` and `testViaModule` functions would be logged. Except only the string (defined in module.ts, also passed via runtimeConfig), is logged in the browser.\r\n\r\nI have made a codesandbox to reproduce. You can find it [here](https://codesandbox.io/p/github/jvhellemondt/nuxt-module-starter/draft/trusting-galileo?file=%2Fsrc%2Fmodule.ts&workspaceId=26bac05a-e35e-485b-bb0f-53f697bee73f).\r\n\r\nIs it intended that I cannot pass functions to runtime like this? I have the feeling that it's not possible due to rollup, however I'm definitely not an expert on that. If so, is there another way around? It seems vital that users of the module can provide it via the Nuxt.config.ts from a user experience perspective.\r\n\r\nHope someone is able to help out. If I need to explain further, please let me know.\r\n\r\nThank you in advance.\r\n\r\nBest regards,\r\n\r\nJ",[3132,3133],{"name":3063,"color":3064},{"name":3066,"color":3067},20933,"Question/ bug: How to provide functions from within Nuxt.config.ts or module.ts to runtime?","2024-04-17T06:42:23Z","https://github.com/nuxt/nuxt/issues/20933",0.70431674,["Reactive",3140],{},["Set"],["ShallowReactive",3143],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f_1idE-Qqv7oou_wO4ob85J-j6oxVJBm-Cbmm4IF1j3A":-1},"/nuxt/icon/412"]