Object
和有什么区别和 object
在 Angular typescript 中
我收到一个 tslint 错误:
Don't use 'Object' as a type. Avoid using the
Object
type. Did you meanobject
?
最佳答案
https://mariusschulz.com/blog/typescript-2-2-the-object-typeobject
表示任何非原始类型。以下类型被认为是 JavaScript 中的原始类型:
字符串,
bool 值,
数字,
大神,
象征,
无效的,
不明确的。
While
object
(lowercased) represents all non-primitive types,Object
(uppercased) describes functionality that is common to all JavaScript objects.
关于javascript - 对象和对象类型有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56107944/