News

TypeScript 3.8 Debuts, with Help from Bloomberg

Microsoft has debuted TypeScript 3.8, with a special shout out of thanks to financial firm Bloomberg for helping to provide support for ECMAScript's private fields.

Though stewarded by Microsoft, its creator, TypeScript is an open-source project whose development is carried out on GitHub, providing the ability for developers to leverage static type checking and other functionality not found in vanilla JavaScript. As such, open source contributors help out with the language's development, and in announcing TypeScript 3.8, program manager Daniel Rosenwasser singled out the dev team at Bloomberg.

"TypeScript 3.8 brings support for ECMAScript's private fields, part of the stage-3 class fields proposal," Rosenwasser said. "This work was started and driven to completion by our good friends at Bloomberg!" ECMAScript is a specification created by an industry association to standardize JavaScript in order to help foster multiple independent implementations.

Private fields differ from regular properties in several ways, Rosenwasser explained, specifically listing:

  • Private fields start with a # character. Sometimes we call these private names.
  • Every private field name is uniquely scoped to its containing class.
  • TypeScript accessibility modifiers like public or private can't be used on private fields.
  • Private fields can't be accessed or even detected outside of the containing class – even by JS users! Sometimes we call this hard privacy.

Rosenwasser explained under which circumstances developers should use the ECMAScript scheme as opposed to traditional properties marked with the private keyword, the differences between "soft privacy" and "hard privacy," and more.

He also doled out credit for the work involved in supporting the feature.

"It's worth reiterating how much work went into this feature from our contributors at Bloomberg. They were diligent in taking the time to learn to contribute features to the compiler/language service, and paid close attention to the ECMAScript specification to test that the feature was implemented in compliant manner. They even improved another 3rd party project, CLA Assistant, which made contributing to TypeScript even easier."

Bloomberg has been active in TypeScript's development, to the point that a bloomberg/TypeScript repo exists on GitHub, described as "a fork of Microsoft's TypeScript repository, created so that Bloomberg's engineering team can collaborate with each other (and the rest of the TypeScript community) on enhancements to TypeScript. Branches in this repository represent 'work in progress' that will be contributed to the Microsoft TypeScript repository when the work is ready for review."

Rosenwasser thanked eight Bloomberg developers by name for contributing to v3.8.

Other highlights of the release as detailed by the program manager include:

Once again, however, there was no mention of the the Investigate error messages in haiku or iambic pentameter proposal that was added to the TypeScript roadmap in May 2018. It's still listed under the "Future" section of the roadmap, along with variadic types, flattening declarations and many other planned improvements.

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Compare New GitHub Copilot Free Plan for Visual Studio/VS Code to Paid Plans

    The free plan restricts the number of completions, chat requests and access to AI models, being suitable for occasional users and small projects.

  • Diving Deep into .NET MAUI

    Ever since someone figured out that fiddling bits results in source code, developers have sought one codebase for all types of apps on all platforms, with Microsoft's latest attempt to further that effort being .NET MAUI.

  • Copilot AI Boosts Abound in New VS Code v1.96

    Microsoft improved on its new "Copilot Edit" functionality in the latest release of Visual Studio Code, v1.96, its open-source based code editor that has become the most popular in the world according to many surveys.

  • AdaBoost Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the AdaBoost.R2 algorithm for regression problems (where the goal is to predict a single numeric value). The implementation follows the original source research paper closely, so you can use it as a guide for customization for specific scenarios.

  • Versioning and Documenting ASP.NET Core Services

    Building an API with ASP.NET Core is only half the job. If your API is going to live more than one release cycle, you're going to need to version it. If you have other people building clients for it, you're going to need to document it.

Subscribe on YouTube