I still run into libraries written in Coffeescript, and hate it when I do, because I don't use it and have a hard time following it. Javascript libraries should be written in Javascript. Worship the one true God!
Except this really isn't an issue for TypeScript, it reads that close to JavaScript.
JavaScript libraries should be written in TypeScript
31–40 of 285 posts
Re: JavaScript libraries should be written in TypeScript
#32Seems ironic that JS community is starting to come around to that finally.
Re: JavaScript libraries should be written in TypeScript
#33Or at the very least, library documentation really needs to clearly specify the types of parameters and return values. I'm positively surprised when I come across a JavaScript API whose documentation actually specifies this very basic information. Coming from the static typing world, it's astounding...
I agree with the author: types are there anyway, typescript seems to work well enough and has traction now, so please, if you write a library: add those type annotations bottom-up in the library and let typescript generate a nice .d.ts declaration file and standardized module stub around that final javascript library.
Re: JavaScript libraries should be written in TypeScript
#34Re: JavaScript libraries should be written in TypeScript
#35EDIT:
Hey people down voting me; it literally is the same. C++ is a standard, JS is a standard. TypeScript is (like Objective-C) a compatible alternative.
Re: JavaScript libraries should be written in TypeScript
#36Oh of course, because it is strongly typed Title just reinforces my belief that people have this feeling towards strongly typed languages like it's some kind of religious saviour and will try to preach it everywhere
Re: JavaScript libraries should be written in TypeScript
#37Re: JavaScript libraries should be written in TypeScript
#38I still run into libraries written in Coffeescript, and hate it when I do, because I don't use it and have a hard time following it. Javascript libraries should be written in Javascript. Worship the one true God!
Re: JavaScript libraries should be written in TypeScript
#39Starts off with: > Typed vs dynamic is a rather controversial topic, so I’m not trying to spark that discussion all over again. Goes on to explain that typed is betterer... The article doesn't really offer up any real arguments as to why you should specifically use TypeScript, but really just says typed is nice and everyone lints anyway (not true) so the step up to a type system really isn't that big of a deal (also…
This article is targeted at authors and maintainers of high-adoption libraries. It says so right in the second paragraph.
And, frankly (speaking as someone with experience on this topic), he's right. Maybe static isn't always the answer, but in the context of high-adoption libraries, a little bit of effort to improve clarity and strictness is a huge lever for cutting down on wasted time of thousands of developers everywhere.
> The article doesn't really offer up any real arguments as to why you should specifically use TypeScript
Did you read it? He offers the Git/Mercurial comparison of TypeScript's growing popularity.
Re: JavaScript libraries should be written in TypeScript
#40Starts off with: > Typed vs dynamic is a rather controversial topic, so I’m not trying to spark that discussion all over again. Goes on to explain that typed is betterer... The article doesn't really offer up any real arguments as to why you should specifically use TypeScript, but really just says typed is nice and everyone lints anyway (not true) so the step up to a type system really isn't that big of a deal (also…