In TypeScript, 'Object', '{}', and 'object' serve distinct purposes. 'Object' (uppercase) describes properties common to all JavaScript objects and can have boxable objects like string, boolean, etc. '{}' describes an object with no members and behaves similarly to 'Object' but represents a different concept. 'object' (lowercase) refers to any non-primitive type. 'Record<string, any>' is also often used to represent non-primitive types and is more semantic.
1 Comment
Sort: