TypeScript 5.1 production release arrives
TypeScript 5.1, featuring easier implicit returns for undefined-returning functions and allowing unrelated types for getters and setters, is now available as a production release as of June 1.
Version 5.1 features a whole host of coding enhancements for Microsoft’s strongly typed language that builds on JavaScript. With easier implicit returns for undefined-returning functions, TypeScript 5.1 allows
undefined
-returning functions to have no return statement, fixing a situation in which only functions that could have absolutely no return statements werevoid
-returning andany
-returning functions. This meant that even if a developer explicitly indicated that a function returnedundefined
, at least one return statement was required.
Author: . [Source Link (*), InfoWorld]