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.
anyis 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
anyat all and useunknownandneverinstead. I've usedanyas an example for someone who doesn't really want to use typescript.i 100% agree that
anyis the troublemaker and we should be usingnever&unknown.