Argument of type '{ class: string; }' is not assignable to parameter of type 'ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Readonly<ExtractPropTypes<Partial<{ selectable: boolean; userSelect: boolean; space: _TextSpace; decode: boolean; }>>>, {}, ... 17 more ..., {}>, ... 4 more ..., MethodOptions> & ... 4 more ... & Record<...>'.
Type '{ class: string; }' is not assignable to type 'ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Readonly<ExtractPropTypes<Partial<{ selectable: boolean; userSelect: boolean; space: _TextSpace; decode: boolean; }>>>, {}, ... 17 more ..., {}>, ... 4 more ..., MethodOptions>'.
Type '{ class: string; }' provides no match for the signature 'new (...args: any[]): CreateComponentPublicInstance<Readonly<ExtractPropTypes<Partial<{ selectable: boolean; userSelect: boolean; space: _TextSpace; decode: boolean; }>>>, ... 18 more ..., {}>'.ts-plugin(2345)
描述问题
项目使用Vues + ts 构建, 能正常开发和编译。但在Visual Studio Code中显示错误:
uni-ui组件无报错信息,uni-app内置组件view, text, button. 有错误提示:
package.json
tsconfig.json
复现
visual studio code 的插件
uni-app内置组件在visual studio code 中显示错误。
系统信息
基础环境信息:
macOS 13.0
20.10.0
pnpm
1.91.1
2.0.28
基础依赖信息:
3.4.35
5.3.5
3.0.0-alpha-4020520240731001
uni-helper依赖信息:
1.0.0-alpha.1
uni-helper插件信息:
2.1.0
0.9.3
0.10.4
0.3.0
0.5.9
0.3.10
0.6.6
使用的包管理器
pnpm
核对