News

TypeScript 4.4 Beta Boosts Performance, Suggests JavaScript Spelling

Microsoft has shipped a TypeScript v4.4 beta release, with new features ranging from performance improvements to spelling suggestions in JavaScript files.

The new beta follows TypeScript, v4.3, which was released in May. The final v4.4 release is targeted for Aug. 24, according to the iteration plan.

Performance improvements are many, including:

  • Faster Path Normalization: This concerns several types of "normalization" on file paths to get them into a consistent format for the compiler to use. Now, paths first undergo quick checks to see whether normalization is even needed, which can help reduce project load time by 5-10 percent on bigger projects, and significantly more in massive projects, according to internal testing.
  • Faster Path Mapping: v4.4 now caches the way it constructs path-mappings, resulting in significantly reduced mapping time for projects with several hundred mappings.
  • Faster Incremental Builds with --strict: This fixes what was effectively a bug: redoing type-checking work under --incremental compilations if --strict was on, which led to many builds being just as slow as if --incremental was turned off.
  • Faster Source Map Generation for Big Outputs: An optimization for source map generation on extremely large output files has been added. This results in about an 8 percent reduction in emit time when building an older version of the TypeScript compiler.
  • Faster --force Builds: Now --force builds avoid unnecessary steps (up-to-date checks to see which files need to be rebuilt) taken when using --build mode on project references, because when performing a --force build that information is irrelevant as all project dependencies will be rebuilt from scratch.

Another new feature in the v4.4 beta is spelling suggestions in JavaScript files. Now the customary "Did you mean ...?" suggestions familiar to coders working in TypeScript files are available in plain JavaScript files (ones without // @ts-check or in a project with checkJs turned off.)

"TypeScript powers the JavaScript editing experience in editors like Visual Studio and Visual Studio Code," said Microsoft's Daniel Rosenwasser in a July 1 blog post. "Most of the time, TypeScript tries to stay out of the way in JavaScript files; however, TypeScript often has a lot of information to make confident suggestions, and ways of surfacing suggestions that aren't too invasive.

"These spelling suggestions can provide a subtle clue that your code is wrong. We managed to find a few bugs in existing code while testing this feature!"

Other highlights of the beta release as presented by Rosenwasser include:

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

  • Hands On: New VS Code Insiders Build Creates Web Page from Image in Seconds

    New Vision support with GitHub Copilot in the latest Visual Studio Code Insiders build takes a user-supplied mockup image and creates a web page from it in seconds, handling all the HTML and CSS.

  • Naive Bayes Regression Using C#

    Dr. James McCaffrey from Microsoft Research presents a complete end-to-end demonstration of the naive Bayes regression technique, where the goal is to predict a single numeric value. Compared to other machine learning regression techniques, naive Bayes regression is usually less accurate, but is simple, easy to implement and customize, works on both large and small datasets, is highly interpretable, and doesn't require tuning any hyperparameters.

  • VS Code Copilot Previews New GPT-4o AI Code Completion Model

    The 4o upgrade includes additional training on more than 275,000 high-quality public repositories in over 30 popular programming languages, said Microsoft-owned GitHub, which created the original "AI pair programmer" years ago.

  • Microsoft's Rust Embrace Continues with Azure SDK Beta

    "Rust's strong type system and ownership model help prevent common programming errors such as null pointer dereferencing and buffer overflows, leading to more secure and stable code."

  • Xcode IDE from Microsoft Archrival Apple Gets Copilot AI

    Just after expanding the reach of its Copilot AI coding assistant to the open-source Eclipse IDE, Microsoft showcased how it's going even further, providing details about a preview version for the Xcode IDE from archrival Apple.

Subscribe on YouTube

Upcoming Training Events