Home United States USA — software Microsoft shares release candidate for TypeScript 5.1

Microsoft shares release candidate for TypeScript 5.1

94
0
SHARE

In TypeScript 5.1 functions that return “undefined” will no longer be required to have a return statement.
Microsoft is nearing the release of TypeScript 5.1, and before the final release has launched the release candidate. The company says that no new features or changes will be made between this and the final release. 
In TypeScript 5.1 functions that return “undefined” will no longer be required to have a return statement. Previously the only functions that could have no return statements were those that returned “void” or “any”. Another update is that when a function doesn’t have a return expression and is passed to something that expects a function to return “undefined,” TypeScript will now infer that the function’s return type is “undefined.

Continue reading...