\n\nWhere I use config then, it shows me typing error.\nWhen I switch to the legacy tsconfig, typing issue are gone.\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\nTypecheck summary: \n\n\n\napp/layouts/default.vue:35:33 - error TS2339: Property 'title' does not exist on type '{}'.\n\n35 title: appConfig.information?.title,\n ~~~~~\n\napp/layouts/default.vue:36:39 - error TS2339: Property 'description' does not exist on type '{}'.\n\n36 description: appConfig.information?.description,\n ~~~~~~~~~~~\n\napp/layouts/default.vue:39:36 - error TS2339: Property 'socials' does not exist on type '{}'.\n\n39 github: appConfig.information?.socials?.github,\n ~~~~~~~\n\napp/layouts/default.vue:40:38 - error TS2339: Property 'socials' does not exist on type '{}'.\n\n40 linkedin: appConfig.information?.socials?.linkedin,\n ~~~~~~~\n\napp/layouts/default.vue:41:40 - error TS2339: Property 'birthdate' does not exist on type '{}'.\n\n41 isBirthday: appConfig.information?.birthdate ? isBirthday(appConfig.information?.birthdate) : false,\n ~~~~~~~~~\n\napp/layouts/default.vue:41:86 - error TS2339: Property 'birthdate' does not exist on type '{}'.\n\n41 isBirthday: appConfig.information?.birthdate ? isBirthday(appConfig.information?.birthdate) : false,\n ~~~~~~~~~\n\napp/layouts/default.vue:44:27 - error TS2339: Property 'icons' does not exist on type '{}'.\n\n44 normal: appConfig.ui?.icons?.normal as string[] ?? [],\n ~~~~~\n\napp/layouts/default.vue:45:29 - error TS2339: Property 'icons' does not exist on type '{}'.\n\n45 birthday: appConfig.ui?.icons?.birthday as string[] ?? [],\n ~~~~~\n\napp/middleware/title.global.ts:5:28 - error TS2571: Object is of type 'unknown'.\n\n5 const appConfigTitle = useAppConfig().information.title;\n ~~~~~~~~~~~~~~~~~~~~~~~~~~\n\napp/pages/index.vue:14:62 - error TS2339: Property 'messages' does not exist on type '{}'.\n\n14 const messages = useState('randomIndex', () => appConfig.ui?.messages?.sort(() => Math.random() - 0.5))\n ~~~~~~~~\n\nnuxt.schema.ts:3:16 - error TS2304: Cannot find name 'defineNuxtSchema'.\n\n3 export default defineNuxtSchema({\n ~~~~~~~~~~~~~~~~\n\nnuxt.schema.ts:3:16 - error TS2304: Cannot find name 'defineNuxtSchema'.\n\n3 export default defineNuxtSchema({\n ~~~~~~~~~~~~~~~~\n\nnuxt.schema.ts:3:16 - error TS2304: Cannot find name 'defineNuxtSchema'.\n\n3 export default defineNuxtSchema({\n ~~~~~~~~~~~~~~~~\n```",[3151,3154],{"name":3152,"color":3153},"pending triage","E99695",{"name":3155,"color":3156},"possible regression","B90A42",32768,"nuxt","open","useAppConfig lose types from nuxt schema with new tsconfig","2025-07-25T22:51:01Z","https://github.com/nuxt/nuxt/issues/32768",0.6816707,{"description":3165,"labels":3166,"number":3173,"owner":3158,"repository":3158,"state":3159,"title":3174,"updated_at":3175,"url":3176,"score":3177},"### Environment\n\n\n- Operating System: Linux\n- Node Version: v18.20.3\n- Nuxt Version: 3.13.2\n- CLI Version: 3.14.0\n- Nitro Version: 2.9.7\n- Package Manager: npm@10.2.3\n- Builder: -\n- User Config: -\n- Runtime Modules: -\n- Build Modules: -\n\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-1ys8s7?file=useApi.ts\n\n### Describe the bug\n\nWe recently ran into an edge case with `useAsyncData`. In some specific scenarios using `getCachedData` and `transform` it seems that the inference is broken and it expects the return value of the handler function to match the return value of `getCachedData`. \n\n```ts\nimport { useNuxtApp, useAsyncData } from 'nuxt/app';\nimport { toValue } from 'vue';\n\ntype ApiResponseFoo = { foo: string };\ntype ApiResponseBar = { bar: string };\n\nconst API = {\n foo: async function foo(): Promise\u003CApiResponseFoo> {\n return Promise.resolve({\n foo: 'hello, world',\n });\n },\n bar: async function bar(): Promise\u003CApiResponseBar> {\n return Promise.resolve({\n bar: 'hello, world',\n });\n },\n};\n\nexport default function useFooAPI() {\n const nuxtApp = useNuxtApp();\n return useAsyncData(\n async () => { \n return API.foo(); // Type error here, expects string\n },\n {\n transform: (response) => response.foo,\n getCachedData: (key: string) => {\n return (toValue(nuxtApp._asyncData[key]?.data) as string) ?? undefined;\n },\n }\n );\n}\n```\n\nIt seems that all the stars need to be misaligned for this error to occur. Making any of the following changes clears the error:\n\n- Remove the explicit `key: string` typing in `getCachedData`\n- Use the `nuxtApp` instance that is passed into `getCachedData` instead of calling `useNuxtApp()`\n- Adding explicit typing to the `transform` e.g. `(response: ApiResponseFoo) => response.foo`\n- Changing the definition of `getCachedData` to have `undefined` within the `NoInfer`: `(key: string, nuxtApp: NuxtApp) => NoInfer\u003CDataT | undefined>`\n\nIt's a bit beyond my TypeScript knowledge to say why this is happening, but I thought I'd report it here in case anyone else has ideas. \n\nDoes it make sense to make the `NoInfer` change in Nuxt? While this specific bug is quite easy to workaround, perhaps there are other cases where the inference is incorrect?\n\n### Additional context\n\nRelated issues:\n\nhttps://github.com/nuxt/nuxt/pull/25946\nhttps://github.com/nuxt/nuxt/pull/28187\n\n### Logs\n\n_No response_",[3167,3170],{"name":3168,"color":3169},"good first issue","fbca04",{"name":3171,"color":3172},"types","2875C3",29567,"Incorrect type inference in `useAsyncData` with `transform` and `getCachedData`","2025-02-11T18:25:03Z","https://github.com/nuxt/nuxt/issues/29567",0.6861179,{"description":3179,"labels":3180,"number":30,"owner":3158,"repository":3181,"state":3182,"title":3183,"updated_at":3184,"url":3185,"score":3186},"@harlan-zw hi!\r\n\r\nI may have missed it somewhere, although I've gone through the documentation completely.\r\nCan you please tell me if it is possible to add two or more GTM containers?\r\nIf so, how do I use them?\r\n\r\nIn brief - I need to use different gtm-id on different url's. And the GTM script should be loaded immediately, by default",[],"scripts","closed","Two or more GTM containers","2024-08-07T02:22:06Z","https://github.com/nuxt/scripts/issues/154",0.67099094,{"description":3188,"labels":3189,"number":3190,"owner":3158,"repository":3191,"state":3182,"title":3192,"updated_at":3193,"url":3194,"score":3195},"##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,"icon","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.6743234,{"description":3197,"labels":3198,"number":3201,"owner":3158,"repository":3158,"state":3182,"title":3202,"updated_at":3203,"url":3204,"score":3205},"### 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_",[3199,3200],{"name":3152,"color":3153},{"name":3155,"color":3156},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.6769077,{"description":3207,"labels":3208,"number":3209,"owner":3158,"repository":3191,"state":3182,"title":3210,"updated_at":3211,"url":3212,"score":3213},"Recently upgraded Nuxt Icon in my SPA Nuxt app (using Nuxt 3.3 with SSR set to false and strict typescript) and hit a bug when running `npm run generate`.\r\n\r\n```ts\r\n node_modules/nuxt-icon/dist/runtime/IconCSS.vue:6:28 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.\r\n\r\n6 const aliases = appConfig?.nuxtIcon?.aliases || {}\r\n ~~~~~~~~\r\n\r\nnode_modules/nuxt-icon/dist/runtime/Icon.vue:11:28 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.\r\n\r\n11 const aliases = appConfig?.nuxtIcon?.aliases || {}\r\n ~~~~~~~~\r\n\r\nnode_modules/nuxt-icon/dist/runtime/IconCSS.vue:25:39 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.\r\n\r\n\r\n25 if (!props.size && typeof appConfig.nuxtIcon?.size === 'boolean' && !appConfig.nuxtIcon?.size) {\r\n ~~~~~~~~\r\n\r\nnode_modules/nuxt-icon/dist/runtime/Icon.vue:28:44 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.\r\n\r\n28 const iconName = computed(() => (appConfig.nuxtIcon?.aliases || {})[props.name] || props.name)\r\n ~~~~~~~~\r\n\r\nnode_modules/nuxt-icon/dist/runtime/IconCSS.vue:28:40 - error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'.\r\n\r\n28 const size = props.size || appConfig.nuxtIcon?.size || '1em'\r\n ~~~~~~~~\r\n\r\n\r\nFound 6 errors in 2 files.\r\n\r\nErrors Files\r\n 4 node_modules/nuxt-icon/dist/runtime/IconCSS.vue:6\r\n 2 node_modules/nuxt-icon/dist/runtime/Icon.vue:11\r\n```\r\n\r\nCreated minimal reproduction and posted code on public github repo available here: https://github.com/frasza/nuxt-icon-m-repro-bug",[],62,"error TS2339: Property 'nuxtIcon' does not exist on type 'AppConfig'","2023-06-19T14:11:13Z","https://github.com/nuxt/icon/issues/62",0.67699486,{"description":3215,"labels":3216,"number":3227,"owner":3158,"repository":3158,"state":3182,"title":3228,"updated_at":3229,"url":3230,"score":3231},"### Environment\r\n\r\n- Operating System: Linux\r\n- Node Version: v18.18.0\r\n- Nuxt Version: 3.9.3\r\n- CLI Version: 3.10.0\r\n- Nitro Version: 2.8.1\r\n- Package Manager: npm@10.2.3\r\n- Builder: -\r\n- User Config: devtools\r\n- Runtime Modules: -\r\n- Build Modules: -\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-issues-25443\r\n\r\n```vue\r\n\u003Cscript setup lang=\"ts\">\r\nconst { data } = useAsyncData\u003C{ data: { test: 1 } }>(\r\n 'key',\r\n async (): Promise\u003Cany> => {\r\n return { data: { test: 1 } };\r\n },\r\n {\r\n pick: ['data'],\r\n }\r\n);\r\n\r\nconst test = computed(() => data.value?.test);\r\n\u003C/script>\r\n\u003Ctemplate>\r\n \u003Cdiv>\r\n {{ test }}\r\n \u003C/div>\r\n\u003C/template>\r\n```\r\n\r\nTypcheck fails with `app.vue:12:41 - error TS2339: Property 'test' does not exist on type '{ data: { test: 1; }; }'.`\r\n\r\n### Describe the bug\r\n\r\nuseFetch/useAsyncData should augment the provided type via generic when pick or transform is present.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3217,3218,3221,3224],{"name":3171,"color":3172},{"name":3219,"color":3220},"3.x","29bc7f",{"name":3222,"color":3223},"bug","d73a4a",{"name":3225,"color":3226},"🔨 p3-minor","FBCA04",25443,"useAsyncData/useFetch types do not reflect pick changes anymore","2024-02-12T14:42:56Z","https://github.com/nuxt/nuxt/issues/25443",0.68569636,{"description":3233,"labels":3234,"number":3239,"owner":3158,"repository":3158,"state":3182,"title":3240,"updated_at":3241,"url":3242,"score":3243},"### 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.",[3235,3236],{"name":3152,"color":3153},{"name":3237,"color":3238},"2.x","d4c5f9",9047,"Nuxt build aborts on const declaration in data() - Typescript","2023-01-22T15:38:48Z","https://github.com/nuxt/nuxt/issues/9047",0.68893385,{"labels":3245,"number":3249,"owner":3158,"repository":3158,"state":3182,"title":3250,"updated_at":3251,"url":3252,"score":3253},[3246,3247,3248],{"name":3171,"color":3172},{"name":3219,"color":3220},{"name":3225,"color":3226},14440,"[Typescript] useAsyncData looses the type of response, when pick option is not specified for certain types","2023-04-15T10:03:11Z","https://github.com/nuxt/nuxt/issues/14440",0.689069,{"description":3255,"labels":3256,"number":3261,"owner":3158,"repository":3158,"state":3182,"title":3262,"updated_at":3263,"url":3264,"score":3265},"### Environment\n\n------------------------------\r\n- Operating System: Linux\r\n- Node Version: v20.14.0\r\n- Nuxt Version: 3.12.1\r\n- CLI Version: 3.12.0\r\n- Nitro Version: 2.9.6\r\n- Package Manager: pnpm@9.1.4\r\n- Builder: -\r\n- User Config: ssr, future, components, css, typescript, modules, devtools, eslint, image, i18n, veeValidate\r\n- Runtime Modules: nuxt-icon@0.6.10, @nuxt/eslint@0.3.13, @nuxt/image@1.7.0, @nuxtjs/i18n@8.3.1, @pinia/nuxt@0.5.1, @vee-validate/nuxt@4.12.7\r\n- Build Modules: -\r\n------------------------------\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-69djhq?file=app%2Fapp.vue\n\n### Describe the bug\n\nIf you check out the reproduction and run `nuxt typecheck` you'll see that\r\n```ts\r\nconst { data } = useFetch(\"/api/foo\")\r\nconst foo: string | undefined = data.value\r\n```\r\nreturns an error because the type of `data` still is `unknown | null` instead of corresponding to v4's new `undefined` return type\n\n### Additional context\n\n_No response_\n\n### Logs\n\n_No response_",[3257,3258,3259,3260],{"name":3171,"color":3172},{"name":3219,"color":3220},{"name":3222,"color":3223},{"name":3225,"color":3226},27565,"useAsyncData's return type for data and error still is `| null` in v4","2024-06-12T16:32:54Z","https://github.com/nuxt/nuxt/issues/27565",0.6898947,["Reactive",3267],{},["Set"],["ShallowReactive",3270],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fvvN4va42jFcLm_DHsIfclzOdM4Tm_aqyU1lwdS3TDRw":-1},"/nuxt/nuxt.com/781"]