Closed aparajita closed 3 years ago
I think it's fine to double check the input is of the string type, as with JS they could pass anything. Sure it's unlikely, but I don't see a reason to go out of our way and remove checks like this.
I think it's fine to double check the input is of the string type, as with JS they could pass anything.
By that reasoning you should be type checking every argument. Just saying...
And @adamdbradley if you look at my conversation with Dan, I checked the source of those parameters and they are not external and thus could not be anything but strings.
Okay @adamdbradley and @dwieeb, this is my last word on this.
TypeScript 101:
unknown
and then type checks have to be made.Believe it or not, I took the time — my unpaid time — to think it through and check carefully if there was any possibility of this being a breaking change before I submitted the PR. Casually dismissing it is a perfect way to discourage further contributions.
Cleaned up various issues pointed out by WebStorm.