Vue报错 Argument of type ‘any‘ is not assignable to parameter of type ‘never‘.

项目导入时出现该报错

Vue报错 Argument of type ‘any‘ is not assignable to parameter of type ‘never‘._第1张图片

报错内容:

Argument of type 'any' is not assignable to parameter of type 'never'.ts(2345)

const userInfo: {
userIcon: string;
realname: string;
sex: string;
}

尝试以下解决 

Vue报错 Argument of type ‘any‘ is not assignable to parameter of type ‘never‘._第2张图片

但role这边仍有报错,错误内容:

Property 'role' does not exist on type '{ userIcon: string; realname: string; sex: string; }'.ts(2339)

any

又尝试以下修改后解决。 

Vue报错 Argument of type ‘any‘ is not assignable to parameter of type ‘never‘._第3张图片

 

你可能感兴趣的:(java,mybatis,开发语言)