The beta of TypeScript 4.9 is available, including substantial enhancements such as the new ‘satisfies’ operator. However, ECMAScript Decorators, which were scheduled for this release, are likely to be delayed.
TypeScript 4.9 will be available as a release candidate on November 1 and as a final version in mid-November. Daniel Rosenwasser, senior program manager, stated in a blog post that “the new ‘satisfies’ operator allows users to validate that the type of an expression matches some type without adjusting the resulting type of that expression”, adding that “satisfies can be used to catch lots of possible errors”.
What can users expect?
Another new feature is TypeScript’s watch mode, which offers automatic file compilation as files change. It has also been modified to use file system events by default instead of polling for changes, which is less efficient.
It will still use polling as necessary, but for most developers, Rosenwasser said, this should give a significantly less resource-intensive experience.
However, one item initially planned for TypeScript 4.9 is missing: ECMAScript Decorators. They are a tricky issue because TypeScript already provides experimental decorators, which are annotations that change the behaviour of classes or class members.
“While decorators have reached stage 3, we saw some behaviour in the spec that needed to be discussed”, Rosenwasser explained. “Between addressing that and reviewing the changes, we expect decorators will be implemented in the next version.”