\r\n\u003C/template>\r\n```\n\n### Alternative\n\nDo nothing, `useResizeObserver` isn’t actually that hard to use.\n\n### Additional context\n\n_No response_\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.",[2893],{"name":2894,"color":2895},"enhancement","a2eeef",3391,"ResizeObserver as a directive","2024-08-01T07:09:04Z","https://github.com/vueuse/vueuse/issues/3391",0.67493993,{"description":2902,"labels":2903,"number":2910,"owner":2857,"repository":2857,"state":2858,"title":2911,"updated_at":2912,"url":2913,"score":2914},"### Describe the bug\n\nwithin the first code example https://vueuse.org/core/onLongPress/\r\nhtmlRefHook on line 16 reports:\r\nArgument of type 'Ref\u003CHTMLElement | null>' is not assignable to parameter of type 'MaybeElementRef\u003CMaybeElement>'.\r\nProperty '[RefSymbol]' is missing in type 'Ref\u003CHTMLElement | null>' but required in type 'Ref\u003CMaybeElement>'.ts(2345)\n\n### Reproduction\n\ncopy and paste above code on a working vue + typescript project \n\n### System Info\n\n```Shell\nvscode mac\n```\n\n\n### Used Package Manager\n\nnpm\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[2904,2907],{"name":2905,"color":2906},"documentation","0075ca",{"name":2908,"color":2909},"has pr","5319E7",3827,"Typescript error onLongPress","2024-02-28T08:08:56Z","https://github.com/vueuse/vueuse/issues/3827",0.6901999,{"description":2916,"labels":2917,"number":2918,"owner":2857,"repository":2857,"state":2858,"title":2919,"updated_at":2920,"url":2921,"score":2922},"### Describe the bug\n\nnode_modules/@vueuse/shared/index.d.ts:398:119 - error TS1128: Declaration or statement expected.\r\n\r\n398 declare function makeDestructurable\u003CT extends Record\u003Cstring, unknown>, const A extends readonly any[]>(obj: T, arr: A): T & A;\r\n ~\r\nFound 10 errors in the same file, starting at: node_modules/@vueuse/shared/index.d.ts:398\n\n### Reproduction\n\nnew version\n\n### System Info\n\n```Shell\nSystem:\r\n OS: macOS 14.2.1\r\n CPU: (11) arm64 Apple M3 Pro\r\n Memory: 96.42 MB / 18.00 GB\r\n Shell: 5.9 - /bin/zsh\r\n Binaries:\r\n Node: 18.19.0 - ~/.nvm/versions/node/v18.19.0/bin/node\r\n Yarn: 1.22.21 - ~/.nvm/versions/node/v18.19.0/bin/yarn\r\n npm: 10.2.3 - ~/.nvm/versions/node/v18.19.0/bin/npm\r\n pnpm: 8.15.4 - ~/.nvm/versions/node/v18.19.0/bin/pnpm\r\n bun: 1.1.6 - ~/.bun/bin/bun\r\n Browsers:\r\n Chrome: 125.0.6422.113\r\n Safari: 17.2.1\r\n npmPackages:\r\n @vueuse/core: ^10.10.0 => 10.10.0 \r\n vue: ^3.4.27 => 3.4.27\n```\n\n\n### Used Package Manager\n\nnpm\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],4006,"The project packaging will report this TypeScript error.","2024-06-11T13:29:52Z","https://github.com/vueuse/vueuse/issues/4006",0.6902596,{"description":2924,"labels":2925,"number":1229,"owner":2857,"repository":2928,"state":2858,"title":2929,"updated_at":2930,"url":2931,"score":2932},"Hello,\r\n\r\nI'm having trouble using your library to implement some functions in `typescript`. Is showing me the message\r\n\r\n```shell\r\n\"Error: [vue-composition-api] must call Vue.use (VueCompositionAPI) before using any function.\"\r\n```\r\nI leave below the error output.\r\nI will appreciate your help and your prompt response.!!\r\n\r\n\r\n\r\n```ts\r\nimport {ref, reactive, UnwrapRef, Ref } from 'vue-demi';\r\n\r\nexport function fxReactive\u003CT extends object>(obj: T): UnwrapRef\u003CT> {\r\n return reactive(obj);\r\n}\r\n\r\nconst fx = fxReactive({\r\n data: []\r\n});\r\n\r\nconsole.log(fx.data);\r\n```\r\n\r\n**devDependecies**\r\n\r\n```json\r\n\"@vue/composition-api\": \"^1.0.0-beta.1\",\r\n\"vue\": \"^2.6.11\"\r\n```\r\n\r\n**dependecies**\r\n```json\r\n\"vue-demi\": \"latest\"\r\n```\r\n\r\n\r\n**error**\r\n```shell\r\nC:\\Users\\c\\Desktop\\reactivefx\\node_modules\\@vue\\composition-api\\dist\\vue-composition-api.common.js:43\r\n throw new Error(\"[vue-composition-api] \" + msg);\r\n ^\r\nError: [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function.\r\n at assert (C:\\Users\\c\\Desktop\\reactivefx\\node_modules\\@vue\\composition-api\\dist\\vue-composition-api.common.js:43:15)\r\n at getVueConstructor (C:\\Users\\c\\Desktop\\reactivefx\\node_modules\\@vue\\composition-api\\dist\\vue-composition-api.common.js:83:9)\r\n at observe (C:\\Users\\c\\Desktop\\reactivefx\\node_modules\\@vue\\composition-api\\dist\\vue-composition-api.common.js:470:15)\r\n at Function.reactive (C:\\Users\\c\\Desktop\\reactivefx\\node_modules\\@vue\\composition-api\\dist\\vue-composition-api.common.js:595:20)\r\n at fxReactive (C:\\Users\\c\\Desktop\\reactivefx\\src\\index.ts:6:10)\r\n at Object.\u003Canonymous> (C:\\Users\\c\\Desktop\\reactivefx\\src\\index.ts:9:12)\r\n at Module._compile (internal/modules/cjs/loader.js:1176:30)\r\n at Module.m._compile (C:\\Users\\c\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:473:23)\r\n at Module._extensions..js (internal/modules/cjs/loader.js:1196:10)\r\n at Object.require.extensions.\u003Ccomputed> [as .ts] (C:\\Users\\c\\AppData\\Roaming\\npm\\node_modules\\ts-node\\src\\index.ts:476:12)\r\n```\r\n",[2926],{"name":2883,"color":2927},"fcd735","vue-demi","Error: [vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function in typescripts","2020-08-20T15:29:40Z","https://github.com/vueuse/vue-demi/issues/6",0.6903322,{"description":2934,"labels":2935,"number":2936,"owner":2857,"repository":2857,"state":2858,"title":2937,"updated_at":2938,"url":2939,"score":2940},"### Describe the bug\n\nThere is a weird issue when using syncRef with readonly values\r\n\r\n```ts\r\nimport {syncRef} from '@vueuse/core'\r\nimport {ref} from 'vue'\r\n\r\nconst i = ref\u003Creadonly string[]>([])\r\nconst b = ref\u003Cstring[]>([...i.value])\r\n\r\nsyncRef(i, b, {\r\n direction: 'ltr',\r\n transform: (v) => [...v],\r\n})\r\n```\r\nsyncRef fails in this code stating \"v\" is type unknown. \"v\" should be correctly inferred to by of type readonly string[], and subsequently the code should have no issues as the transform is making a copy\n\n### Reproduction\n\n(read desc)\n\n### System Info\n\n```Shell\nSystem:\r\n OS: Linux 6.6 Pop!_OS 22.04 LTS\r\n CPU: (16) x64 AMD Ryzen 7 7800X3D 8-Core Processor\r\n Memory: 19.39 GB / 30.50 GB\r\n Container: Yes\r\n Shell: 5.1.16 - /bin/bash\r\n Binaries:\r\n Node: 20.7.0 - /run/user/1000/fnm_multishells/40622_1703374850077/bin/node\r\n npm: 10.1.0 - /run/user/1000/fnm_multishells/40622_1703374850077/bin/npm\r\n pnpm: 8.6.5 - ~/.local/share/pnpm/pnpm\r\n bun: 1.0.2 - ~/.bun/bin/bun\n```\n\n\n### Used Package Manager\n\npnpm\n\n### Validations\n\n- [X] Follow our [Code of Conduct](https://github.com/vueuse/vueuse/blob/main/CODE_OF_CONDUCT.md)\n- [X] Read the [Contributing Guidelines](https://github.com/vueuse/vueuse/blob/main/CONTRIBUTING.md).\n- [X] Read the [docs](https://vueuse.org/guide).\n- [X] Check that there isn't [already an issue](https://github.com/vueuse/vueuse/issues) that reports the same bug to avoid creating a duplicate.\n- [X] Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.\n- [X] Check that this is a concrete bug. For Q&A open a [GitHub Discussion](https://github.com/vueuse/vueuse/discussions).\n- [X] The provided reproduction is a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) of the bug.",[],3669,"Typescript type error with syncRef when one value is readonly","2023-12-27T02:07:49Z","https://github.com/vueuse/vueuse/issues/3669",0.6904207,{"description":2942,"labels":2943,"number":2947,"owner":2857,"repository":2857,"state":2858,"title":2948,"updated_at":2949,"url":2950,"score":2951},"Since the `VueInstance` type is actually expressed as `any` instead of the expected `Vue` instance, the `MaybeElementRef` type dependent on `VueInstance` is also `any`. In the `useResizeObserver` method, the `target` parameter can be any Value, I can pass in any value such as numbers, strings, etc.Although there is a null value judgment in the `unrefElement` method, I personally feel that it does not meet the type semantics.\r\n\r\n\r\n\r\n\r\n\r\n\r\nIf this is intentional or designed, can you explain the intention? or directly close the issue.",[2944],{"name":2945,"color":2946},"bug","d73a4a",685,"The ts type error causes the actual code to be inconsistent with the semantics","2021-09-17T06:28:26Z","https://github.com/vueuse/vueuse/issues/685",0.69088686,["Reactive",2953],{},["Set"],["ShallowReactive",2956],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$f_csaLMF_H2gqo_KcwKxl-944ElMH9hlgiPIsa7fc4tg":-1},"/vueuse/vueuse/154"]