You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To make things more confusing, there are also object literals and object Objects. But object literals are still static Objects and object Objects are instantiated Objects. So an object primitive is still an object Object.
45
-
46
-
However, `Object.create(null)` objects are not `instanceof Object`, however, so
47
-
in the case of this Object we lower-case to indicate possible support for
48
-
these objects.
44
+
To make things more confusing, there are also object literals and object Objects. But object literals are still static Objects and object Objects are instantiated Objects. So an object primitive is still an object Object. (`Object.create(null)` objects are not, however.)
49
45
50
46
Basically, for primitives, we want to define the type as a primitive, because that's what we use in 99.9% of cases. For everything else, we use the type rather than the primitive. Otherwise it would all just be `{object}`.
51
47
52
-
In short: It's not about consistency, rather about the 99.9% use case. (And some
53
-
functions might not even support the objects if they are checking for identity.)
48
+
In short: It's not about consistency, rather about the 99.9% use case.
To make things more confusing, there are also object literals and object Objects. But object literals are still static Objects and object Objects are instantiated Objects. So an object primitive is still an object Object.
1285
-
1286
-
However, `Object.create(null)` objects are not `instanceof Object`, however, so
1287
-
in the case of this Object we lower-case to indicate possible support for
1288
-
these objects.
1284
+
To make things more confusing, there are also object literals and object Objects. But object literals are still static Objects and object Objects are instantiated Objects. So an object primitive is still an object Object. (`Object.create(null)` objects are not, however.)
1289
1285
1290
1286
Basically, for primitives, we want to define the type as a primitive, because that's what we use in 99.9% of cases. For everything else, we use the type rather than the primitive. Otherwise it would all just be `{object}`.
1291
1287
1292
-
In short: It's not about consistency, rather about the 99.9% use case. (And some
1293
-
functions might not even support the objects if they are checking for identity.)
1288
+
In short: It's not about consistency, rather about the 99.9% use case.
// Settings: {"jsdoc":{"preferredTypes":{"abc":{"message":"Messed up JSDoc @{{tagName}}{{tagValue}} type \"{{badType}}\"; prefer: \"{{preferredType}}\".","replacement":"Abc"},"cde":{"message":"More messed up JSDoc @{{tagName}}{{tagValue}} type \"{{badType}}\"; prefer: \"{{preferredType}}\".","replacement":"Cde"},"object":"Object"}}}
1382
+
// Settings: {"jsdoc":{"preferredTypes":{"abc":{"message":"Messed up JSDoc @{{tagName}}{{tagValue}} type \"{{badType}}\"; prefer: \"{{preferredType}}\".","replacement":"Abc"},"cde":{"message":"More messed up JSDoc @{{tagName}}{{tagValue}} type \"{{badType}}\"; prefer: \"{{preferredType}}\".","replacement":"Cde"},"Object":"object"}}}
1388
1383
// Message: Messed up JSDoc @param "foo" type "abc"; prefer: "Abc".
0 commit comments