Those are some very interesting features. Love the defer stuff. One of the few golang features I actually like.
Is TypeScript being a bit early here or is the TC39 proposal further along than I thought? Last I checked it was in stage 3 and still had a little ways to go…
The
using
? The GitHub for it says stage 3.
It might be that Typescript thinks the API is stable enough to provide the polyfill for it until it gets properly implemented.
Certainly, this is a beta branch. So perhaps Typescript knows it’s about to go stage 4, and they will bump it to 5.2 (RC?) when that happens.I guess to help stabilise the API, people need to be able to try it and test it.
So, typescript releasing a beta for it means people can play around with it.
After all, it is a beta release. So, still subject to change.I thought TypeScript wanted to avoid putting in syntax before it’s ready in JS, but you might be right that they just know more than we do about when it’s going to stage 4.