Tech
TypeScript 4.7 and 4.8 Beta Releases Add ESM for Node.js and Better Type Inference – InfoQ.com
The TypeScript team announced the release of TypeScript 4.8 beta and TypeScript 4.7, which introduces ES Module (ESM) support for Node.js, improved type inference and control flow analysis, and significant performance improvements.
Since ES6 introduced modules in 2015, work has been underway to move the JavaScript and TypeScript ecosystems to the native module format. Early usage was primarily limited to authoring, with build tools such as Webpack and transpilers such as TypeScript converting code to modules that would run in various environments.
As the module format has improved over the past few years, browsers natively support ESM loading and Node.js 16 now does as well. The TypeScript 4.7 release helps get us closer to a world where all JavaScript is authored and used as ESM.
Daniel Rosenwasser, TypeScript Program Manager, explains:
For the last few years, Node.js has been working to support ECMAScript modules (ESM). This has been a very difficult feature, since the Node.js ecosystem is built on a different module system called CommonJS (CJS). Interoperating between the two brings large challenges, with many new features to juggle.
TypeScript 4.7 adds two new module settings: node16
and nodenext
. Through the use of package.json’s "type": "module"
, Node.js determines whether .js files are interpreted as ESM or CommonJS modules. ESM supports key features include import/export statements and top-level async/await.
Relative import paths with ESM need full file extensions in the path, and various techniques used by CommonJS modules are not supported such as top-level require and module.
Node.js supports two new file extensions for modules always of ESM or CJS, .mjs and .cjs, so TypeScript has added analogs, .mts and .cts.
These releases add more than just Node.js ESM support. Control-Flow Analysis for bracketed element access helps narrow the types of element accesses when the indexed keys are literal types and unique symbols. The --strictPropertyInitialization
flag now checks that computed properties get initialized before the end of a constructor body.
TypeScript 4.7 also supports more granular type inference from functions within objects and arrays. New support for instantiation expressions allow for the narrowing of generics during instantiation.
TypeScript 4.8 adds many correctness and consistency improvements to the --strictNullChecks
mode. Improvements to intersection and union types help TypeScript narrow its type definitions.
Also in TypeScript 4.8, the TypeScript tranpsiler can better infer types within template string types.
TypeScript transpiler improvements with --build
, --watch
, and --incremental
reduce typical transpilation times by 10-25%.
These two releases added dozens of other improvements and bug fixes. Read the full release notes to learn more about each release.
The official release of TypeScript 4.8 is expected in mid-late August, in time for TypeScript turning 10 years old in October!
TypeScript is open-source software available under the Apache 2 license. Contributions and feedback are encouraged via the TypeScript GitHub project and should follow the TypeScript contribution guidelines and Microsoft open-source code of conduct.
Tech
Downhill Bikes of Sea Otter – Part 2
|
@juanhall: I gotta say, this was the most interesting bike in this post….love that Intense is experimenting with gearboxes…I can see it have a huge effect on DH bikes….thank god there’s still people pushing things. Now, they need to make an Enduro bike with the Pinion MGU!
Tech
Important updates regarding the Bob-Birnie Arena
|
The City of Pointe-Claire would like to inform you that the Bob-Birnie arena will be closed for its annual maintenance as of Monday, April 29. The Annex rink will reopen to the public on Monday, May 13, and the arena’s Main rink will be accessible as of Monday, June 3.
Public skating will resume on May 13, and the summer public activities programming will begin on June 3 when both rinks have reopened to the public.
In addition to the annual maintenance of the facility, two renovation projects are also scheduled to start at the same time:
Installation of new sound systems
The City will be replacing its current sound systems in both the Main rink and Annex rink, to offer arena visitors a better overall experience, whether watching from the stands or participating in on-ice activities. This project is expected to be conducted throughout the month of May.
Renovation of locker rooms in the Main Rink
The City will also be renovating the five locker rooms located in the Main rink, to bring up to date the amenities currently available to participants. These renovations are expected to begin in early May and will be completed by mid-August.
For all information about the Bob-Birnie arena, visit the arena’s page on our website.
Tech
Surprise Apple Event Hints at First New iPads in Years – CNET
We haven’t seen a new iPad in years, but Apple seems likely to change that in just a few weeks. All signs point to the release of new iPad models in the first week of May.
This morning, I received an email invite for a virtual Apple event, scheduled for May 7 at 7 a.m. PT (10 a.m. ET). The invite, which says “Let Loose,” shows a drawing of a hand holding an Apple Pencil. Considering the iPad is the only device that uses the Pencil — that doesn’t leave much to the imagination.
Apple’s been expected to release new OLED-screened iPad Pros with newly designed Pencils and Magic Keyboard cases. New iPad Airs are also expected, including a larger-screened 12.9-inch model. Apple’s iPad Air lineup tends to be slightly redesigned versions of previous-model iPad Pros, so just look to the M2 iPad Pro lineup for a sense of what the next Airs could be. These would be the first new iPads since the iPad Pro M2 model arrived in late 2022.
-
Health6 hours ago
Remnants of bird flu virus found in pasteurized milk, FDA says
-
Art12 hours ago
Mayor's youth advisory council seeks submissions for art gala – SooToday
-
News18 hours ago
Some Canadians will be digging out of 25+ cm of snow by Friday – The Weather Network
-
Health10 hours ago
Bird flu virus found in grocery milk as officials say supply still safe
-
Science20 hours ago
"Hi, It's Me": NASA's Voyager 1 Phones Home From 15 Billion Miles Away – NDTV
-
Media17 hours ago
Jon Stewart Slams the Media for Coverage of Trump Trial – The New York Times
-
Investment11 hours ago
Taxes should not wag the tail of the investment dog, but that’s what Trudeau wants
-
Real eState23 hours ago
Caution about Canada's private real estate sector abounds as valuations slow to adjust – The Globe and Mail