\n\u003C/template>\n\n\u003Cscript setup>\n\tconst keyword = ref('');\n\n\twatchEffect(() => {\n\t\tconsole.log('馃殌 ~ watchEffect ~ keyword.value:', keyword.value);\n\t});\n\u003C/script>\n```\n\n\n\n```vue\n\u003Ctemplate>\n\t\u003CUInput v-model=\"keyword\" />\n\u003C/template>\n\n\u003Cscript setup>\n\tconst keyword = ref('');\n\n\twatchEffect(() => {\n\t\tconsole.log('馃殌 ~ watchEffect ~ keyword.value:', keyword.value);\n\t});\n\u003C/script>\n```\n\n### Logs\n\n```shell-script\n\n```",[2886,2889],{"name":2887,"color":2888},"bug","d73a4a",{"name":2890,"color":2891},"triage","ffffff",2713,"ui","UInput Component Lacks Proper Handling of compositionstart and compositionend","2024-11-21T06:40:46Z","https://github.com/nuxt/ui/issues/2713",0.67608124,{"description":2899,"labels":2900,"number":2907,"owner":2877,"repository":2893,"state":2908,"title":2909,"updated_at":2910,"url":2911,"score":2912},"### Description\n\nHi, would be great to have a closeAll on the useOverlay. Usefull especially if you have 2+ overlays\n\n### Additional context\n\n_No response_",[2901,2903,2906],{"name":2868,"color":2902},"a2eeef",{"name":2904,"color":2905},"v3","49DCB8",{"name":2890,"color":2891},3953,"closed","useOverlay closeAll","2025-04-25T13:04:04Z","https://github.com/nuxt/ui/issues/3953",0.6315302,{"description":2914,"labels":2915,"number":2931,"owner":2877,"repository":2877,"state":2908,"title":2932,"updated_at":2933,"url":2934,"score":2935},"Hi everyone!\r\n\r\nFirst, thanks so much to the team for this great work! Congrats for this release!\r\n\r\nI was asking me something about useFetch, if it's possible, working in typescript...\r\nSee below:\r\n\r\nI've a test interface:\r\n```javascript\r\ninterface test {\r\n prop1: string;\r\n prop2: string;\r\n prop3: string;\r\n}\r\n```\r\n\r\nI've a test api endpoint: (server/api/test.ts)\r\n```javascript\r\nexport default () => {\r\n return {\r\n prop1: 'PROP1',\r\n prop2: 'PROP2',\r\n prop3: 'PROP3',\r\n }\r\n}\r\n```\r\n\r\nI'm fetching it:\r\n```javascript\r\nconst { data } = await useFetch\u003Ctest>('/api/test', {pick: ['prop1', 'prop3']})\r\n```\r\n\r\nSo data is typed as Ref\u003Ctest | null>, that's mean my autocompletion suggest prop2 is possible yet\r\n\r\nI would like force response type with a second interface corresponding to my picked option (for a better completion! No way in my template to use a bad prop which was not picked)\r\n```javascript\r\ninterface testPicked {\r\n prop1: string;\r\n prop3: string;\r\n}\r\n```\r\n\r\n1st interface is a full model, picked values are keys of it, 2nd interface is my output for a better completion.\r\nIs it possible to do something like this? In wich way?\r\n\r\nThanks\r\nBenWa",[2916,2919,2922,2925,2928],{"name":2917,"color":2918},"types","2875C3",{"name":2920,"color":2921},"3.x","29bc7f",{"name":2923,"color":2924},"workaround available","11376d",{"name":2926,"color":2927},"pending triage","E99695",{"name":2929,"color":2930},"upstream","E8A36D",15527,"Is there a way to type a fetch response picked?","2023-05-22T07:29:32Z","https://github.com/nuxt/nuxt/issues/15527",0.64286023,{"description":2937,"labels":2938,"number":2946,"owner":2877,"repository":2877,"state":2908,"title":2947,"updated_at":2948,"url":2949,"score":2950},"### Describe the feature\n\nQuery options in `useFetch` are reactive, so it automatically watches for changes there. Headers should be also reactive and actually it is, I can pass `ref` to headers and it will watch for changes, but will give TypeScript errors.\r\n\r\nIt is because it only accepts `string` as value, but should accept `MaybeRef\u003Cstring>`.\n\n### Additional information\n\n- [ ] 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).",[2939,2940,2941,2942,2943],{"name":2871,"color":2872},{"name":2917,"color":2918},{"name":2920,"color":2921},{"name":2887,"color":2888},{"name":2944,"color":2945},"馃敤 p3-minor","FBCA04",23626,"Headers object of `useFetch` should be reactive","2023-10-16T11:56:38Z","https://github.com/nuxt/nuxt/issues/23626",0.64784527,{"description":2952,"labels":2953,"number":2959,"owner":2877,"repository":2960,"state":2908,"title":2961,"updated_at":2962,"url":2963,"score":2964},"### Environment\r\n\r\nENV\r\nos: Darwin\r\nnodejs: 18.18.0\r\nnuxt: 3.9.0\r\n@nuxt/test-utils: 3.9.0\r\nvitest: 1.1.1\r\nyarn: 1.15.2\r\n\r\n### Reproduction\r\n\r\nhttps://stackblitz.com/edit/nuxt-starter-vwmlx3?file=utils.test.js\r\n\r\n### Describe the bug\r\n\r\nHi, I'm using @nuxt/test-utils and vitest for testing on Nuxt3.\r\nDue to our team's convention, the configuration uses 'autoImport: false'.(For an explicit declaration) So when importing Nuxt's built-in items (useRoute, nextTick, computed, etc.) we use '#imports'.\r\n\r\nWhen I run test, the following error occurs:\r\n**_Error: Failed to resolve import \"#imports\" from \"utils.js\". Does the file exist?_**\r\nThe image below can be viewed in the same way through reproduction.\r\n\r\n\r\nWhen using autoImport: false in nuxt.config.js, test-utils can't resolve #imports alias.\r\nIs it possible to solve this problem through the alias property in vitest.config.js?\r\nI tried many things, but couldn't find a way.\r\n\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_",[2954,2957],{"name":2955,"color":2956},"needs reproduction","DE7793",{"name":2926,"color":2958},"5D08F5",700,"test-utils","test-utils can't resolve import '#imports'(Nuxt3, vitest) ","2024-06-21T04:42:45Z","https://github.com/nuxt/test-utils/issues/700",0.6526481,{"description":2966,"labels":2967,"number":2969,"owner":2877,"repository":2877,"state":2908,"title":2970,"updated_at":2971,"url":2972,"score":2973},"Although it can be used, there are warnings. Why? Can't I keep using useFetch?\r\n\r\n\r\n\r\n\r\n```\r\nimport type {UseFetchOptions} from \"#app\";\r\nimport type {Ref} from \"vue\";\r\nimport type {SearchParameters} from \"ofetch\";\r\n\r\nconst request = async \u003CT = any>(url: any, options: any) => {\r\n const config = useRuntimeConfig();\r\n //璁剧疆url\r\n options.baseURL=config.public.apiBase\r\n let token = useCookie(\"manageToken\")\r\n let customHeaders: { \"Content-Type\": string, Authorization?: string } = {\"Content-Type\": \"application/json\"}\r\n const res=await useFetch\u003CT>(url, {headers: customHeaders,...options})\r\n if(process.client){\r\n if(res.error&&res.error.value){\r\n ElNotification({\r\n title: '绯荤粺閿欒鎻愮ず',\r\n message: res.error.value.message,\r\n type: 'error',\r\n appendTo: document.body,\r\n zIndex: 9999\r\n })\r\n }\r\n else if (res.data.value&&(res.data.value as any).Msg) {\r\n if((res.data.value as any).Code===0){\r\n ElNotification({\r\n title: '绯荤粺鎻愮ず',\r\n message: (res.data.value as any).Msg,\r\n type: 'success',\r\n appendTo: document.body,\r\n zIndex: 9999\r\n })\r\n }\r\n else{\r\n ElNotification({\r\n title: '閿欒鎻愮ず',\r\n message: (res.data.value as any).Msg,\r\n type: 'error',\r\n appendTo: document.body,\r\n zIndex: 9999\r\n })\r\n }\r\n }\r\n }\r\n\r\n return res\r\n};\r\ntype ResponseType\u003CT = any> = T extends undefined ? CommonResponse\u003Cany> : CommonResponse\u003CT>;\r\n\r\nexport const http = {\r\n get: \u003CT = any>(url: Ref\u003Cstring>|string, query?: SearchParameters, opts?: UseFetchOptions\u003CT>) => {\r\n return request\u003CT>(url, {...opts,...{method: 'GET', query}});\r\n },\r\n post: \u003CT = undefined>(url: Ref\u003Cstring>|string, body?: RequestInit[\"body\"] | Record\u003Cstring, any>, opts?: UseFetchOptions\u003CResponseType\u003CT>>) => {\r\n return request\u003CResponseType\u003CT>>(url, {...opts,...{method: 'POST', body}});\r\n },\r\n put: \u003CT = undefined>(url: Ref\u003Cstring>|string, body?: RequestInit[\"body\"] | Record\u003Cstring, any>, opts?: UseFetchOptions\u003CResponseType\u003CT>>) => {\r\n return request\u003CResponseType\u003CT>>(url, {...opts,...{method: 'PUT', body}});\r\n },\r\n postGetList: (url: Ref\u003Cstring>|string, body?: RequestInit[\"body\"] | Record\u003Cstring, any>, opts?: UseFetchOptions\u003CResponseType\u003CCommonResponseGetList>>) => {\r\n return request\u003CCommonResponseGetList>(url, {...opts,...{method: 'POST', body}});\r\n },\r\n}\r\n\r\n```",[2968],{"name":2955,"color":2945},27242,"[useFetch] Component is already mounted, please use $fetch instead. See https://nuxt.com/docs/getting-started/data-fetching","2024-06-27T14:10:07Z","https://github.com/nuxt/nuxt/issues/27242",0.65853935,{"description":2975,"labels":2976,"number":2983,"owner":2877,"repository":2877,"state":2908,"title":2984,"updated_at":2985,"url":2986,"score":2987},"### Describe the feature\n\nWhen useFetch or useAsyncData is called with the default option, data will not actually be null, but the return types will contain null.\r\nI would like to avoid null in the return types.\r\n\r\n```ts\r\nexport interface _AsyncData\u003CDataT, ErrorT> {\r\n data: Ref\u003CDataT | null>\r\n pending: Ref\u003Cboolean>\r\n refresh: (opts?: AsyncDataExecuteOptions) => Promise\u003Cvoid>\r\n execute: (opts?: AsyncDataExecuteOptions) => Promise\u003Cvoid>\r\n error: Ref\u003CErrorT | null>\r\n}\r\n```\n\n### Additional information\n\n- [ ] 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).",[2977,2978,2979,2982],{"name":2917,"color":2918},{"name":2920,"color":2921},{"name":2980,"color":2981},"dx","C39D69",{"name":2874,"color":2875},20967,"Types improvement to `asyncData` with the `default` option","2023-05-20T22:19:52Z","https://github.com/nuxt/nuxt/issues/20967",0.66041887,{"labels":2989,"number":2993,"owner":2877,"repository":2877,"state":2908,"title":2994,"updated_at":2995,"url":2996,"score":2997},[2990,2991,2992],{"name":2920,"color":2921},{"name":2926,"color":2927},{"name":2929,"color":2930},13876,"fetching data that has an response content-type of \"application/problem+json\"","2023-01-19T17:08:42Z","https://github.com/nuxt/nuxt/issues/13876",0.66933334,{"description":2999,"labels":3000,"number":3007,"owner":2877,"repository":2877,"state":2908,"title":3008,"updated_at":3009,"url":3010,"score":3011},"### Environment\r\n\r\nnuxt: 3.8.2\r\n\r\n### Reproduction\r\n\r\n```ts\r\nconst newOptions: UseFetchOptions\u003CT> = {\r\n baseURL: BASE_URL,\r\n method,\r\n // headers: { ...normalParams },\r\n onRequest ({ options }) {\r\n options.headers = {\r\n ...optionsHeader,\r\n 'Content-Type': 'application/json'\r\n }\r\n },\r\n async onResponse ({ response }) {\r\n const responseData = typeof response._data === 'string' ? JSON.parse(response._data) : response._data\r\n const { code } = responseData\r\n if (code === RESPOND.SUCCESS) {\r\n return response._data\r\n } else if (NOT_FOUND_CODES.includes(code)) {\r\n navigateTo('/404/')\r\n return Promise.reject(response._data)\r\n } else {\r\n if (LOGOUT_CODES.includes(code)) {\r\n user.clearUserInfo()\r\n }\r\n return response._data\r\n }\r\n },\r\n onResponseError ({ response }) {\r\n return response?._data ?? null\r\n },\r\n ...options\r\n }\r\n\r\nuseFetch(url, newOptions)\r\n .then((res) => {\r\n if (typeof res.data.value === 'string') {\r\n resolve(JSON.parse(res.data.value))\r\n } else {\r\n resolve(res.data.value)\r\n }\r\n })\r\n .catch((error) => {\r\n reject(error)\r\n })\r\n```\r\n\r\n### Describe the bug\r\n\r\n\r\n\r\n\r\nthe same request in production environment锛宻tatus is error and data is null, but in development environment i got data and status is success.\r\nonResponse and onResponseError is not executed.\r\n\r\n### Additional context\r\n\r\n_No response_\r\n\r\n### Logs\r\n\r\n_No response_",[3001,3002,3003,3004],{"name":2920,"color":2921},{"name":2926,"color":2927},{"name":2955,"color":2945},{"name":3005,"color":3006},"closed-by-bot","ededed",25032,"useFetch request status is error, data is null","2024-01-11T01:49:31Z","https://github.com/nuxt/nuxt/issues/25032",0.66995746,["Reactive",3013],{},["Set"],["ShallowReactive",3016],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fhYPH_TRomi17qEEzH8N5JAJnrZ5SsELCOT0xvEfgPUU":-1},"/nuxt/icon/327"]