Source code Code quality

@ts-ignore masking type error

Part of the AI-generated code risks check · fix arrives as a pull request

What it is

A @ts-ignore or @ts-expect-error comment suppresses a type error rather than resolving it.

Why it matters

The error being silenced is usually a real mismatch — a nullable value treated as present, or a shape that changed. Suppressing it moves the failure from compile time to runtime and hides it from everyone who reads the file later.

How to fix it

Remove the suppression and fix the underlying type. Where an external library genuinely has wrong types, narrow the escape to the smallest possible expression and leave a comment naming the library and the reason.

Run them all on your app

Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.