JavaScript libraries should be written in TypeScript
21–30 of 285 posts
Re: JavaScript libraries should be written in TypeScript
#22Most of the time, the change is just to rename the file to `.ts`. Sometimes you have to change things because (surprise!) there was a bug.
The biggest painpoint is that you usually have to go pick up some type definition files from DefinitelyTyped for third party libs, but it's well worth it. Second biggest painpoint is type signatures (depending on the context, writing out types/definitions can be subtly different... or maybe I'm doing something wrong).
To anyone who's considering moving their JS stuff to Typescript but have hit some issues, please feel free to ask me. I really think it's a plus for sanity when writing JS.
Re: JavaScript libraries should be written in TypeScript
#23I 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
#24Earlier quoted context omitted.
What's a "big" JavaScript library? How do you know how widely adopted your JavaScript library will be?
Regardless, it's difficult to think of any situation where a All _______ should use _______ is really justified.
I'd say in this situation the title is justified.
Re: JavaScript libraries should be written in TypeScript
#25Not looking forward to not only having to use different build tools for all libraries I work with but also different pre-processors and type analyzers. Oh my.
Re: JavaScript libraries should be written in TypeScript
#26And then new transpiler language appears, with "real" type system, not java-grade. And everyone stops using typescript, treating it as outdated technology.
It already appeared, and is called Purescript. It's great, and it's about as likely to gain traction as Haskell.
So rather unlikely?
Haskell has a JavaScript compiler as well, by the way (GHCJS).
Re: JavaScript libraries should be written in TypeScript
#27Earlier quoted context omitted.
What's a "big" JavaScript library? How do you know how widely adopted your JavaScript library will be?
Regardless, it's difficult to think of any situation where a All _______ should use _______ is really justified.
All software that handles sensitive data should use transport encryption & encryption at rest
All software that uses encryption should use thoroughly vetted professional crypto
All computer users should use backup software
Re: JavaScript libraries should be written in TypeScript
#28Re: JavaScript libraries should be written in TypeScript
#29Re: JavaScript libraries should be written in TypeScript
#30Starts 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…