2 ms·
Interop with existing JS libraries, mostly. JavaScript people do this all over the place. It's considered "convenient" to not have to pass an array for a functi
by skrebbel 12y ago
Interop with existing JS libraries, mostly. JavaScript people do this all over the place. It's considered "convenient" to not have to pass an array for a function's argument when you only want it to operate on a single element. Whether that's a good idea or not is mostly a matter of taste, but it's a fact that it's a really common JS pattern and now TypeScript supports better-than-nothing typechecking for calling such functions. That's pretty cool.