Paul Krill
Editor at Large

Better type checking and more in Deno 1.24

news
Jul 27, 20222 mins

The latest release of the Node.js rival features improved transpiler performance, smarter type checking, and debugging and fallback error handling support.

advantage competition achievement strategy leader recruit
Credit: Thinkstock

A recent upgrade to Deno, the JavaScript and TypeScript runtime positioned as a rival to Node.js, improves performance for transpiling, type checking, and more, proponents say. 

Prior to the Deno 1.24 release, Deno internally converted TypeScript code to JavaScript using the TypeScript compiler when the --check flag was specified; otherwise, it used swc, a Rust-based platform for the web. Now, all emitting is done via swc, which is significantly faster. Thanks to architectural refactors, emitting no longer happens with deno check, and the cache used to store emitted JavaScript has improved. Also, Deno is smarter about not type checking if it has already type-checked some of the code previously.

This roster of new features and upgrades should offer considerable performance improvement, but results will vary depending on the codebase.

More new features and support in Deno 1.24

Additional features and support in the July 21 version update include the following:

  • Support has been added for the unhandledrejection event, which is useful for debugging and fallback error handling for unexpected situations.
  • The beforerunload event, also now supported, lets a web page trigger a confirmation dialog asking a user if they want to leave a page. If confirmed, the browser navigates to the new page.
  • An import.meta.resolve() API allows for resolving specifiers relative to the current module.
  • Performance has been improved for the unstable Foreign Function Interface.
  • Auto import support in the editor has been improved for the Language Server Protocol.
  • The unstable subprocess API has been improved. One upgrade involves change to the types of stdio streams; instead of complicated generic types describing which streams are available, these now are simple, always-available streams.
  • Variable expansion has been enabled in the dotenv standard module.

Developers already using Deno can upgrade to the latest version by running: deno upgrade. The Deno website includes additional instructions and methods for installing the Deno runtime. 

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author