TypeScript · Junior · Question 75 of 75

Why is @ts-expect-error safer than @ts-ignore?

Explanation

Both silence the next line. Add a comment explaining why, and prefer fixing types where possible.

Further reading

Problem with a question

TypeScript · Junior · question 75

Test yourself

Take the TypeScript · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz