Ignoring TypeScript errors

If you have no other choice than to ignore a TypeScript error in your code because of external libraries, here are some utilities to hide the errors in your code.

Hide any type errors

Add this option in the tsconfig.json file

noImplicitAny: true

Hide an error in a specific line

Add a // @ts-ignore comment above the line.

// @ts-ignore
const result = 12 + true;

TypeScript: Documentation - What is a tsconfig.json