TypeScript Object Types

  • an object is a collection of key-value pairs that can represent  any entity.
  • Objects can have properties, methods  of any type


example code:

Type Inference:

TypeScript inference let the compiler automatically detect the data type of a value based on its assigned value.

we does not need to always have to explicitly specify the data type of a variable, allowing you to write more better concise code.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top