3 ms·
I've been porting over a reasonably sized project to Typescript for about a year now, well worth it. Most of the time, the change is just to rename the file to
by rtpg 11y ago
I've been porting over a reasonably sized project to Typescript for about a year now, well worth it.
Most 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.