Skip to content

Ignoring TypeScript errors

Jorge Castro edited this page Nov 10, 2025 · 1 revision

Caution

Please keep in mind that ignoring TypeScript errors is not recommended in most scenarios.

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

Clone this wiki locally