Deno 1.40, the most recent model of the JavaScript runtime positioned as a rival to Node.js, has been launched with a Temporal API for superior date and time operations.
The replace was introduced January 25. Deno could be accessed from deno.com.
The Temporal API is meant to deal with shortcomings of the prevailing Date object in JavaScript. It’s accessible with the –-unstable-temporal flag. Temporal acts as a top-level namespace that brings a contemporary date/time API to JavaScript. Temporal supplies separate lessons for date-only, time-only, and different scoped use circumstances, making code extra readable and stopping bugs attributable to incorrectly assuming 0, UTC, or the native time zone for values which are really unknown.
Deno 1.40 additionally embraces the most recent ECMAScript decorator syntax for extra expressive code. With the decorator syntax, Deno now helps the ECMA Stage 3 decorators proposal for browsers. Decorators are a proposal for extending JavaScript lessons and are extensively adopted amongst builders in transpiler environments.
Different options in Deno 1.40 embody the next:
- Deno now helps the properties
import.meta.filename, which supplies a path for the present module file, andimport.meta.dirname, which supplies a path to the listing containing the present module file. - Constructed-in Node.js APIs are actually accessible resembling
fs.constants,os.machine, andcourse of on (“rejectionHandled”). - The
importsdiscipline indeno.jsonnow helps an easier syntax for specifying dependencies which have subpath exports. - Diagnostics have been improved with a brand new diagnostic printer in
deno lintanddeno doc. - Integration has been strengthened with the embedded occasion of TypeScript’s Language Service API to realize important efficiency boosts and repair some bugs.
Copyright © 2024 IDG Communications, Inc.


