Omg this was totally the way that I wrote JS before TypeScript was invented:
Every function checked that all the arguments were the right type and were non null.
And this was also me:
We later transitioned to TypeScript and deleting all of those defensive checks (replacing them with types) was very satisfying.
It’s so nice to meet others who have had similar journeys. And thank you for sharing your perspective on the clutter of duck typing. I never thought of that so it was really valuable to hear. :)
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.
Omg this was totally the way that I wrote JS before TypeScript was invented:
And this was also me:
It’s so nice to meet others who have had similar journeys. And thank you for sharing your perspective on the clutter of duck typing. I never thought of that so it was really valuable to hear. :)