Re:JavaScript libraries should be written in TypeScript
by dobs on Wednesday March 16, 2016 @10:07AM
(#11297381)
Which leaves me wondering why I'd use Typescript over sticking with ES6, especially with tools like Babel making many future features available right now and libraries like React actively making use of them.
[ Parent
| on HN ]
Re:JavaScript libraries should be written in TypeScript
by squeaky-clean on Wednesday March 16, 2016 @11:13AM
(#11297948)
> especially with tools like Babel making many future features available right now and libraries like React actively making use of them.
You get all of this with Typescript, as well as optional types. If you're writing any Javascript at all, technically you're already writing Typescript.
Re:JavaScript libraries should be written in TypeScript
by agumonkey on Wednesday March 16, 2016 @12:37PM
(#11298618)
People told above, think of TS as a strong linter over normal ES6. Static typecheck is often very nice.
Re:JavaScript libraries should be written in TypeScript
by lloyd-christmas on Wednesday March 16, 2016 @10:33AM
(#11297605)
You shouldn't. My comment was in regards to readability of typescript vs coffeescript vs es6-javascript. If you don't want the added benefit of type-checking with minimal overhead, don't bother.