TS2345
error TS2345: Argument of type ‘
number
‘ is not assignable to parameter of type ‘TimerHandler
‘.
Broken Code ❌
1 |
|
Fixed Code ✔️
There is a mismatch in the expected arguments of a function. The setTimeout
function expects the first argument to be a callback function and not the returned value (in this case a number
) of a function call:
1 |
|