By that definition C++ and C are the same languages. But everyone knows they aren't. And both C/C++ are statically typed languages! You can't just drop a static type system into a scripting language and claim it's an irrelevant difference!
I agree with the other posters - there are probably good defences of JavaScript that can be written, but writing an article about how great JavaScript is and then showing a code sample from a different language just reinforces the idea that JavaScript developers probably don't have much experience with other kinds of programming.
> Not really, Typescript is mostly a superset of ES2015 and is compatible syntax wise.
You could say that about C++ and C, but that's an entire different can of worms.
So why not give the example in JavaScript then? Arguing that JavaScript is "Good, Actually" and then showing examples of tools people have build to avoid using vanilla js because it lacks X or Y is actually an argument for js being "Not Good Enough".
It has almost no new "features" (apart from enums and namespaces, I think) and only contains a typing + visibility system and related syntax on top.
The only part that is not ES2015 in the given code example is the ' as ConsignmentSetup' cast.