Deno 1.18 was released on January 20. Installation instructions are available at deno.land. Other new features and improvements in Deno 1.18:
- Deno will now automatically discover configuration files with the filenames deno.json or deno.jsonc.
Error.causewhich is a property that allows programs to indicate a cause of error, now shows up in all stack traces.
- The nested test steps API, to specify substeps of tests defined by
deno.testsis now stabilized.
- Based on the symbol definition provided by a dynamic library, TypeScript will now infer available method types and throw errors if the call sites do not match the expected types.
- Aliases can now be added when defining symbols in the dynamic library. Thus, developers can rename symbols to maintain a consistent style in code and provide multiple overloads of the same function.
- Custom headers can be set on outgoing WebSockets. These can be used to provide additional information about a WebSocket connection.
- For Deno’s unstable Foreign Function Interface (FFI) 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 autocompletions for registers and easier debugging for individual test cases.
Copyright © 2022 IDG Communications, Inc.