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:
- What is Type Inferences and how does TypeScript compiler know that variable need to infer to a type?
- Learned when to use Type Inference and Type Annotation.
- You should always use Type Inference except for some exception.
- Three thumb rules to use Type Annotation instead of relying on TypeScript compiler.
- 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)