Re:JavaScript libraries should be written in TypeScript
by Roboprog on Wednesday March 16, 2016 @12:29PM
(#11298554)
Thanks for the concrete description. Can I still use dynamic constructs such as string subscripts to associative arrays and code generation via eval()?
[ Parent
| on HN ]
Re:JavaScript libraries should be written in TypeScript
by nothrabannosir on Wednesday March 16, 2016 @12:38PM
(#11298621)
You mean in TS?
Yes. ∀ x: I can do x in JS → I can do x in TS
But, let's assume for a second that you couldn't: this thread is about TS being future-proof. I.e.: ∃ x: I can do x in TS & I cannot do x in JS? No, false.
This implies TS = JS. And that's the point: semantically, TS = JS.
Re:JavaScript libraries should be written in TypeScript
by Roboprog on Wednesday March 16, 2016 @12:42PM
(#11298666)
OK, that's a good start. Is there a tool analogous to JSDoc for TypeScript that gathers the same docs without repeating the type info already in the code?
Re:JavaScript libraries should be written in TypeScript
by elisee on Wednesday March 16, 2016 @02:44PM
(#11299716)
http://typedoc.io/ might be what you're looking for.
Re:JavaScript libraries should be written in TypeScript
by Roboprog on Thursday March 17, 2016 @01:36AM
(#11302765)
Thanks. Also, some informative samples of what TypeScript itself looks like.
https://github.com/sebastian-lenz/typedoc/blob/master/src/li...