Ignore all errors in a typescript file
Full error message
I have a large typescript file that I've inherited. The compiler has many complaints with this file, however it works just fine. I'll come back to it, but is there any way to suppress all warnings/errors in a specific file?
Solutionsource: stackoverflow \u2197
You can use // @ts-nocheck at the top of the file Files // @ts-nocheck import lodash from lodash; //your code here... Look how its done in the code above. UPDATE (2024): If you are getting the Do not use "@ts-nocheck" because it alters compilation errors. message, then try adding the following line: // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-nocheck Check references. https://devblogs.microsoft.com/typescript/announcing-typescript-3-7/ https://github.com/microsoft/TypeScript/wiki/Type-Checking-JavaScript-
API access
Get this solution programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/error/38176568f880cb3676242d036632b29db4144b12b897c4ff895af4e902b05991hash \u00b7 38176568f880cb3676242d036632b29db4144b12b897c4ff895af4e902b05991