Re:JavaScript libraries should be written in TypeScript
by Matthias247 on Wednesday March 16, 2016 @04:03PM
(#11300259)
This is only a typescript definition. It only shows you the types that were already there - even before typescript was introduced. And if the JS developer was not aware that these are the accepted types for the functions then he obviously wouldn't also be able to use or debug it in pure JS.
[ Parent
| on HN ]
Re:JavaScript libraries should be written in TypeScript
by dmethvin on Wednesday March 16, 2016 @05:13PM
(#11300725)
Right, for the human there are still the English API docs to figure out the arguments and return values. These are the type annotations that TypeScript uses to let you know when you've misinterpreted the API docs, which is an incredible time saver.