TypeScript 3.1 adds mappable tuples, which is one of the most common patterns in programming, according to Microsoft. This functionality will now be better equipped to express functions such as
Promise.all, the team noted.
const declaration initialized with a function will be analyzed in terms of its containing scope to track any added properties.
Another improvement is that it adds version redirects via
typesVersions, which will check whether the current version of TypeScript is running or not, and redirect paths accordingly.
TypeScript 3.1 also adds new refactoring that can be used to convert functions that return results with chains of
.catch() calls to
async functions that use
Breaking changes to be aware of include removal of vendor-specific declarations and differences in narrowing functions.