It's a valid error because any time you refer to requestAnimationFrame subsequently the compiler will be using the type that's defined on the window for that method.
If your method is actually compatible (that is, it can be called using the existing signature for requestAnimationFrame even though the types are different), you can cast your method to the type that the compiler is expecting. (Use an intermediate cast to
<any> if necessary).
If your method is not compatible, you could change your definition of addSetTime so that it matches the expected signature and semantics.
Alternatively, you can change the definition of window.requestAnimationFrame, but you shouldn't do that unless you really think the existing definition is incorrect.
In typescript, casts are type annotations that appear in angle brackets in front of the expression being cast.