any is only useful when you are stuck in something that does not have type defs and also when you are working with some javascript library that does not have any types. also note that i wrote starting out with loose typescript configuration and make it strict along the way.
Not even for that. You shouldn't use any at all and use unknown and never instead. I've used any as an example for someone who doesn't really want to use typescript.
any
is only useful when you are stuck in something that does not have type defs and also when you are working with some javascript library that does not have any types. also note that i wrote starting out with loose typescript configuration and make it strict along the way.Not even for that. You shouldn't use
any
at all and useunknown
andnever
instead. I've usedany
as an example for someone who doesn't really want to use typescript.i 100% agree that
any
is the troublemaker and we should be usingnever
&unknown
.