What is the difference between Object and object in angular typescript

I get a tslint error:

Don't use 'Object' as a type. Avoid using the Object type. Did you mean object?

1 Answers

Severin Klug On


object represents any non-primitive type. The following types are considered to be primitive types in JavaScript: string, boolean, number, bigint, symbol, null, undefined.

While object (lowercased) represents all non-primitive types, Object (uppercased) describes functionality that is common to all JavaScript objects.