Empty Object Type
What
The empty object type ({}) in TypeScript represents an object with no defined properties.
How
If you initialize a variable with an empty object literal, TypeScript infers its type as {}. This prevents you from adding properties to it later:
let newUser = {};
newUser.name = "Lane"; // Error: Property 'name' does not exist on type '{}'
Why
TypeScript requires you to define the shape of an object upfront so it can track property access safely. Interestingly, the {} type allows the variable to be reassigned to almost anything (except null or undefined), because most things in JavaScript are technically objects.
Summary
To avoid issues, always predefine the expected properties of an object rather than relying on an empty initialization.