I am beginner in typescript. I have a doubt in usage of \"any\" type.
Using \"any\" is basically opting out type checking if I am right. For example
First of all - If we speak about Typescript, lets avoid the var key-word.
We may need to describe the type of variables that we do not know when we are writing an application. These values may come from dynamic content, e.g. from the user or a 3rd party library. In these cases, we want to opt-out of type-checking and let the values pass through compile-time checks. To do so, we label these with the any type:
Example to this:
let notSure: any = 4;
notSure = "maybe a string instead";
notSure = false; // okay, definitely a boolean
More: Types in Typescript