This question asks about TypeScript (not TSX).
The 2nd highest rated answer originally suggested using (<any>window).MyNamespace
.
The 3rd highest rated answer was always suggesting to use (window as any).MyNamespace
.
One user edited the 2nd highest answer to match the exact syntax of the 3rd highest answer. His logic for doing so was because "[the] syntax is just an old, legacy syntax ..." and "it seems bad for the top voted answer to use the worse syntax" (even though it's not the top voted answer).
Am I wrong in arguing that the 2nd highest answer should not be changed to match the 3rd highest rated answer? It seems like it defeats the purpose of posting answers and voting (what's the point of posting a more correct answer if someone can just change the existing highest answer to the new answer?)
In this case, the second answer explicitly targets TSX as well, so there are more degrees of separation at play.
I'd also imagine over time the 3rd highest answer will get enough votes to surpass the 2nd answer which has the older (but not wrong) syntax.
As a compromise, I added a note to the 2nd highest answer stating that for TSX, the other answer should be used. This did not satisfy the other editor though.