Re:JavaScript libraries should be written in TypeScript
by icholy on Wednesday March 16, 2016 @09:57AM
(#11297294)
> I mean, one of his main points is that everything written in JS should be written in typescript because it helps support typescript users.
I agree, that wasn't a good point.
> Another it is leads to better documentation, with no qualification of how that happens
The type annotations make the source self documenting in a way that doesn't go out of sync. There's also http://typedoc.io/
Re:JavaScript libraries should be written in TypeScript
by tlarkworthy on Wednesday March 16, 2016 @12:09PM
(#11298383)
Typedoc doesn't keep up with TS versions. It's not really solid enough.
I mean, one of his main points is that everything written in JS should be written in typescript because it helps support typescript users. Another it is leads to better documentation, with no qualification of how that happens. It might make your intent more explicit to a reader of the source code, but that doesn't magically translate into documentation for an API user.
I personally find nothing good about trying to coercing a language into something it isn't and then transpilling it back and that article has no strong argument to make me feel any different.