Object Types
Type objects inline or define their shape separately.
Inline Object Type
Section titled “Inline Object Type”Inferred Types
Section titled “Inferred Types”TypeScript infers the type from the value:
Optional Properties
Section titled “Optional Properties”Use ? for properties that might not exist:
Index Signatures
Section titled “Index Signatures”When you don’t know the property names ahead of time: