TS2578

Unused '@ts-expect-error' directive.

Broken Code ❌

// @ts-expect-error
const age = 42;

This error occurs because the @ts-expect-error directive is used, but there is no actual TypeScript error on the next line. The directive should only be used when an error is expected and unavoidable.

Fixed Code βœ”οΈ

If there is no error, you don’t need the directive:

const age = 42;