赞
踩
HarmonyOS Next_HarmonyOS4.0鸿蒙OS全套学习地址:
配套课件及源码网盘下载地址:HarmonyOS HarmonyOS Next系列教程下载地址-IT营大地老师
HarmonyOS NEXT创建对象提示Object literal must correspond to some explicitly declared class or interface
- let userinfo={
- username:"张三",
- age:20,
- sex:"男"
- }
解决办法:
- interface UserInfoInterface{
- username:string,
- age:number,
- sex:string
- }
-
- let userinfo:UserInfoInterface={
- username:"张三",
- age:20,
- sex:"男"
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。