News

Microsoft Releases New TypeScript, R Open Editions

Microsoft has shipped a new release for R Open -- its enhanced distribution of the open source R programming language -- along with a release candidate for its latest TypeScript edition.

The new Microsoft R Open 3.4.3, announced Jan. 17, basically aligns the company's version with the latest edition (also v3.4.3) of the open source R Project, which was released Nov. 30. R is a favorite among developers doing statistical computing.

Microsoft R Open 3.4.3 is based on an R snapshot of the R Project taken on Jan. 1. A list of new and updated packages available with that snapshot is available here.

Meanwhile, TypeScript, Microsoft's JavaScript-based offering (also open source), has a new release candidate: TypeScript 2.7 RC. TypeScript is a JavaScript superset that adds optional static typing to JavaScript -- among other distinctions -- while compiling into clean JavaScript.

While Microsoft claimed many changes and fixes come with the RC, it highlighted three features:

  • Definite Assignment Checks for Class Properties: This is a new flag called --strictPropertyInitialization, which performs checks to ensure each instance property of a class gets initialized in the constructor body, or by a property initializer.
  • Fixed Length Tuples: "In TypeScript 2.6 and earlier, [number, string, string] was considered a subtype of [number, string]," Microsoft said. "This was motivated by TypeScript's structural nature; the first and second elements of a [number, string, string] are respectively subtypes of the first and second elements of [number, string]. However, after examining real world usage of tuples, we noticed that most situations in which this was permitted was typically undesirable." A developer pull request prompted Microsoft to ensure tuple types now encode their arity (the number of arguments or operands that a function takes or expects) into the type of their respective length property, while also ensuring that tuples of different arities are no longer assignable to one another.
  • Improved narrowing for in and instanceof: "The in operator now acts as a narrowing expression for types, narrowing out types that don't explicitly declare properties of a given name," Microsoft said. "Furthermore, the instanceof operator is now leverages the inheritance chain instead of relying on structural compatibility, more accurately reflecting whether how instanceof may behave at runtime."

Yet another change -- referred to as "definite assignment assertions" -- is detailed in the release notes. It lets developers place an exclamation mark (!) after declaring an instance property or variable to indicate that variable is actually assigned, even though TypeScript can't detect it.

Microsoft thanked by name more than 50 open source community developers who contributed to the release. The GitHub repository for TypeScript lists 268 contributors

For more information, including a list of breaking changes, see this blog post.

About the Author

David Ramel is the editor of Visual Studio Magazine.

comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.