DEV Community

Abhay Nikam
Abhay Nikam

Posted on

Day 5/100 - Understanding Type Inferences

On day 5 of #100daysofcode challenge, learned more about Type Inferences and when to use Type Inferences and Type Annotation in the code.

Following are some of the key points I learned today:

  1. What is Type Inferences and how does TypeScript compiler know that variable need to infer to a type?
  2. Learned when to use Type Inference and Type Annotation.
  3. You should always use Type Inference except for some exception.
  4. Three thumb rules to use Type Annotation instead of relying on TypeScript compiler.
  5. The Any type in TypeScript and how to fix it. The side effects of Any type.

Tomorrow, I would start with Annotation with functions.

Happy Coding.

Top comments (0)