Deno 1.18 was published January 20. Installation instructions can be found at deno.land. Other new features and improvements in Deno 1.18:
- Deno now will automatically discover configuration files with the deno.json or deno.jsonc file names.
Error.cause, which is a property that allows programs to indicate a cause for errors, is now displayed in all stack traces.
- The nested test steps API, for specifying sub-steps for tests defined by
deno.tests, is now stabilized.
- Based on the definition of symbols provided by a dynamic library, TypeScript now will infer types of available methods and raise errors if call sites do not match expected types.
- Aliases now can be added when defining symbols in the dynamic library. Thus developers can rename symbols to keep a consistent style in code and provide multiple overloads of the same function.
- Custom headers can be set on outbound WebSockets. These can be used to provide additional information about a WebSocket connection.
- For Deno’s unstable FFI (Foreign Function Interface) APIs, a
Deno.UnsafeFnPointerfunction was added, to call a function from a dynamic library available as a pointer. FFI allows users to call libraries written in native languages that support C ABIs (application binary interfaces) such as Rust and Kotlin.
- The Deno Language Server has been improved, with better auto-completions for registries and simplified debugging for individual test cases.
Copyright © 2022 IDG Communications, Inc.