Sometimes it is hard to come up with valid TypeScript, for example when you reference a library that has tons of entities each of which needs its declaration. In situations like this it would be nice to tell TypeScript to skip a part of code that deals with that library considering it valid. So is there a way to do that in TypeScript?
There isn't a way to turn off type checking for an entire block of code, but if you access anything off an expression of type any
, the result will also be any
, so if you can access the library through an any
reference of any sort, you'll effectively be working without type checking.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With