TypeScript 49 is now in beta, with significant updates including a new “satisfies” operator, but ECMAScript Decorators, which were planned for this release, are likely to be postponed. TypeScript 49 is expected to have a release candidate on November 1 and a final release mid-November.
“The new satisfies operator lets us validate that the type of an expression matches some type, without changing the resulting type of that expression,” explains senior program manager Daniel Rosenwasser, in a post about the new beta, adding that “satisfies can be used to catch lots of possible errors.”
Another new feature, this time in the tooling, is that using TypeScript’s watch mode, which automatically compiles files when they change, has been updated to use file system events by default, rather than polling for changes which is less efficient. It will still fall back to polling when necessary, but “for most developers, this should provide a much less resource-intensive experience,” Rosenwasser says.
There is one feature though which is not in 4.9, even though it was originally slated for inclusion. This is ECMAScript Decorators, a confusing topic since TypeScript already has experimental decorators, annotations which modify the behaviour of classes or class members. ECMAScript has its own decorator proposal, though, which has now reached Stage 3 in ECMAScript jargon, meaning it is feature-complete and awaiting final approval (Stage 4) to become part of the standard.
In a comment, Rosenwasser said that: “While decorators have reached stage 3, we saw some behavior in the spec that needed to be discussed with the champions. Between addressing that and reviewing the changes, we expect decorators will be implemented in the next version.”