Sometimes, we want to fix the "Argument of type ‘X’ is not assignable to parameter of type ‘X’" error with TypeScript.
In this article, we’ll look at how to fix the "Argument of type ‘X’ is not assignable to parameter of type ‘X’" error with TypeScript.
How to fix the "Argument of type ‘X’ is not assignable to parameter of type ‘X’" error with TypeScript?
To fix the "Argument of type ‘X’ is not assignable to parameter of type ‘X’" error with TypeScript, we should restart VS Code to clear the error.
We should also make sure our code has no syntax errors.
Once we restart VS Code and the syntax errors are removed, the error should clear.
Conclusion
To fix the "Argument of type ‘X’ is not assignable to parameter of type ‘X’" error with TypeScript, we should restart VS Code to clear the error.
We should also make sure our code has no syntax errors.