vueuse源代码上的Typescript检测错误



我在vue上完成了我的项目,并希望为生产进行构建。当我输入yarn build时,Typescript在@vueuse/core源中检测到错误

ERROR in /path/to/project/node_modules/@vueuse/shared/index.d.ts(112,5):
112:5 Property or signature expected.
110 |  */
111 | declare type RemovableRef<T> = Omit<Ref<T>, 'value'> & {
> 112 |     get value(): T;
|     ^
113 |     set value(value: T | null | undefined);
114 | };
115 | /**

软件包.json

{
...
"dependencies": {
...
"@vue/composition-api": "^1.7.0",
"@vueuse/core": "^9.1.0",
"vue": "^2.6.14",
"vue-composition-api": "^0.0.1",
"vue-router": "^3.2.0",
"vue-template-compiler": "^2.6.14"
},
"devDependencies": {
"@vue/cli-plugin-typescript": "^5.0.8",
"@vue/cli-service": "^5.0.8",
"font-awesome": "4.7.0",
"typescript": "~4.1.5"
...
}
}

更新到"typescript": "^4.4.4"

https://github.com/vueuse/vueuse/issues/876

最新更新