|
|
|
|
|
by ctrl-j
2190 days ago
|
|
I like typescript not because it prevents most errors in my code, but because it prevents some errors. Those errors, in my experience, tend to be ones that are time consuming to identify and solve. A value of the wrong type passed forward because it's almost the right type can cause errors that make their way into production. I hear you say "so unit test your code!", and to that I reply, we're a c# shop that has only recently started pushing some of our code to the client. If you can convince management that we should shift our paradigm to allow for the time to write tests that don't add much to the sprint we're in, I can send you their email address. The fact is, a large portion of unit tests solve the same problems that strong types solve. |
|
1.) The fact that I even got involved meant the issues were particularly hard to track down
2.) These errors seem to be more of a time sync within a larger team/project than many realize
Typically these were caused by either scope issues and/or some context object that's been riding dirty all day. In the case of the latter hunting down the code that did the naughty can be particularly soul crushing.