Okay that's fair that TypeScript would throw an error, however. I am not saying that you were wrong to ts-ignore but that is never the right* way to do something. In TS, you can extend an object by doing the following:
interfaceWindow{prop:any}
EDIT:
Right as in the way TS intended, there is no objective right way to write something in general.
The whole point is type-safety which means you have to be explicit. That being said, I fully understand the frustration that you can't just drop in some TS while leaving other parts as just JS. Thanks for taking the time to explain your views, it's always interesting to hear why people make the choices they make, even if I do not fully agree with them (but I develop Angular for a living so I am well-acquainted with TS and have learned to love it).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Okay that's fair that TypeScript would throw an error, however. I am not saying that you were wrong to
ts-ignore
but that is never the right* way to do something. In TS, you can extend an object by doing the following:EDIT:
True enough, but that’s also an example of my “TypeScript begets TypeScript” complaint.
The whole point is type-safety which means you have to be explicit. That being said, I fully understand the frustration that you can't just drop in some TS while leaving other parts as just JS. Thanks for taking the time to explain your views, it's always interesting to hear why people make the choices they make, even if I do not fully agree with them (but I develop Angular for a living so I am well-acquainted with TS and have learned to love it).