Select the directory option from the above "Directory" header!

Better type checking and more in Deno 1.24

Better type checking and more in Deno 1.24

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

Credit: Dreamstime

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 support for the unhandledrejection event, which is useful for debugging and fallback error handling for unexpected situations.

Meanwhile, 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.

In addition, an import.meta.resolve() API allows for resolving specifiers relative to the current module, performance has been improved for the unstable Foreign Function Interface and auto import support in the editor has been improved for the Language Server Protocol.

Furthermore, 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 also 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. 

Follow Us

Join the newsletter!


Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.

Tags software

Show Comments