const sum = (number, number) => number+number
Where type annotations becomes unnecessary verbose.
props.removes[cc] !== props.last.margin
TypeScript's strict types will see the error if the those are not the same data type. A TypeScript aware editor will yell at me before I compile the code. Perhaps what I really wanted is: props.removes[cc][0] !== props.last.margin
In JavaScript I would have to execute the code. If the code doesn't throw an error then I would have to examine the output to see if the resulting data structure matches what I expect. If not I have to run tests and track down the error. Then once the error is found and resolved I have to write unit tests for this scenario.If you use Atom or VSCode or any of the other growing number of editors that use Typescript to power their JavaScript/ECMAScript experiences, this Roadmap should help reassure you that the team still has you in mind and wants you to be happy.
(One of the interesting parts here is the reveal that Typescript is moving to use ESLint everywhere instead of TSLint. It's an interesting investment into the lint experience across the board for both JS and TS.)
It's also a convention among JavaScript programmers that each function should not only check the parameters, but also convert them, so you can leave out optional arguments, pass a notated object {foo: "bar"}, or pass a string and have the function convert it to an array so you can write foo(bar) instead of foo([bar]) when calling the function. Or convert an object if it's not of the correct instance. This is more fun then annotating types and having a compiler shout out weird errors at you.