any type is a special type.
Where possible, you should avoid using the
any type unless you want to take
advantage of dynamic types.
any type is a short way of
Treat this variable as if it were compatible
with any other type.
So you can assign it to a string, a number, an
array, an object, a interface with any
structure... anything at all.
So don't think of it as being an
any type, think of it as being "a
string if I assign it to a
You can avoid accidental use of the
any type by passing the
--noImplicitAny compiler flag (or
setting your project settings to use this