TypeScript
TypeScript found an argument that is not assignable to the parameter type
TypeScript rejected a function call because one of the provided arguments does not match the type expected by the target parameter.
TypeScript
TypeScript rejected a function call because one of the provided arguments does not match the type expected by the target parameter.
Observed message
error TS2345: Argument of type 'X' is not assignable to parameter of type 'Y'.
Why it happens
How to fix it
Official reference
TypeScript Docs: TypeScript for JavaScript ProgrammersRelated errors
Explore more