Announcing TypeScript 3.2
blogs.msdn.microsoft.com
blogs.msdn.microsoft.com
I'm not sure how the TS project itself is organized, but I wonder if the type system could be adapted to provide static types to other languages, like Python.
As for 3.2, I'm happy to see the narrowing for tagged unions. I ran into a small annoyance with this a few weeks ago. Looking forward to variadic types in a future release!
Python may not have that great type support. But I found Go type system to be quite good. Can you elaborate
Any suggestions on the best guide for "incrementally, politely, unopinionatedly introducing TS to an existing JS web application"?
Last time I gave it a shot I had to make a lot of changes upfront so I walked away from it.
Then create a `types.ts` file for types that are used throughout your project, and as you see common data structures being used in your program, declare `interface`s and `type` aliases there. Then you can switch your `.js` files to `.ts`/`.tsx` files one-by-one and add types (or even add types via JSDoc and then convert those to `.ts` files when you're ready).
Eventually for the best experience, you can start switching on strictness modes. `strictNullChecks` is a pretty great one to use early on. Then `noImplicitAny` and `noImplicitThis` when you have pretty good type coverage. Finally you can turn on the full `strict` flag which will turn the others on, which are pretty easy to integrate into your codebase (and which you can turn off individually).
And all that, with what I believe is excellent documentation and support. I mean you're getting a getting started comment from the lead managers on the project
Thanks Daniel!
TypeScript seems like a perfect tool to help structure a codebase prior to bringing on more developers.
The proposed @types scaffolding seems interesting for solving issues with untyped libraries. Maybe the focus will be how do we actually get all the code typed rather than resorting to 'any'.
Side note, quite amusing: https://twitter.com/kitsonk/status/973651805950242816