简体   繁体   中英

Turn off certain errors in TypeScript

Is there a way to turn off error checking for certain errors in TypeScript? For example, many of our uses of async functions show this error in our editors: "An async function or method must have a valid awaitable return type."

We would really like to not ever see that error again, without changing our code and adding types that we don't feel like adding or that we don't know until runtime. It looks like this error has the code 1057 from this source file

It would be nice to turn off errors by their code number.

It would be nice to turn off errors by their code number.

This is not supported at the moment. Feel free to create an issue here https://github.com/Microsoft/TypeScript/issues

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM