[英]get error The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type
[英]The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'
key 参数的类型应该是string
,而不是String
。
function checkIsExistObjectKeys(object: Object, key: string): Boolean {
return Object.keys(object).some(x => x === key);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.