adplus-dvertising
Connect with us

Tech

TypeScript 4.7 and 4.8 Beta Releases Add ESM for Node.js and Better Type Inference – InfoQ.com

Published

 on


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.

300x250x1

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.

About the Author

Adblock test (Why?)

728x90x4

Source link

Continue Reading

Tech

Cane Creek Announces 3D-Printed Titanium eMTB Cranks – Pinkbike.com

Published

 on

PRESS RELEASE: Cane Creek Cycling Components

Cane Creek introduces their next offering of titanium cranks, the Cane Creek Electric Wings, to join their iconic eeWings. A crankset designed specifically for the rigors eMTBs face, the innovative Electric Wings are 3D-printed from titanium, resulting in a product that is both incredibly durable and lightweight.

With the Electric Wings, riders can experience the benefit of carbon cranks, without the fear of damage from rock strikes. Electric Wings are as light as carbon, yet as durable as heavy aluminum cranks, making them the perfect choice for those looking to maximize their ride time with confidence.

Implementing advanced 3D-printing additive manufacturing techniques enable freedom in design, opening the door for Cane Creek to set a new benchmark for durability

A New Level of Durability

Break rocks – not cranks – with the Cane Creek Electric Wings. eMTBs are known for taking a beating on rough terrain, which can easily compromise the integrity of carbon cranksets. With the Electric Wings, riders can now enjoy peace of mind, knowing that their cranks are up to the challenge. Whether riders are climbing through a rock garden or hucking to flat, the Electric Wings will give riders the confidence needed to tackle any obstacle.

Compatible with electric bike drive units that use an ISIS motor spindle: The Cane Creek Electric Wings fit Bosch/Yamaha, Brose, Fazua, TQ, Bafang, Specialized motors and more, ensuring compatibility with a wide range of eMTB models.

Lightweight & Stiff

Weighing a mere 383grams – Electric Wings are as light as carbon eMTB cranks while still maintaining one of the best stiffness to weight ratios on the market – Constructed from 6/4 Titanium

3D-Printed Titanium

Implementing advanced additive manufacturing techniques enable freedom in design, opening the door for Cane Creek to set a new benchmark for durability with a titanium crankset designed for electric-assist mountain bikes.

Reduced Pedal “Overhang”

Electric Wings minimize the overall size and “overhang” of material located beyond the pedal insert. This revolutionary manufacturing technique and resulting design drastically reduce pedal strikes compared to standard eMTB cranks.

bigquotes Rock strikes happen, and are even more common on ebikes, particularly while climbing due to the difference in crank cadence created by the electric assist… It’s not a matter of IF you will hit your cranks on the ground but WHEN. We have always believed that Titanium is a superior crank material, for more than just the bling factor. It truly does provide real rider benefits.Sam Anderson, Cane Creek Brand Manager


WEIGHT
– 383g (Including All Hardware)
MATERIALS
– 3D-Printed 6/4 Titanium
LENGTHS
-165mm
SPINDLE INTERFACE
– ISIS
COMPATIBLE MOTORS
– Bafang
– Bosch
– Brose
– Fazua
– Panasonic
– TQ
– Yamaha
WARRANTY
– 5 Years


Availability
Cane Creek Electric Wings are now available at select Cane Creek dealers, distributors and factory direct at www.canecreek.com. These 3D-Printed Titanium eMTB Cranks are $1299.99 and shipments of 165mm length cranks are expected to begin in March

Cane Creek Cycling Components – Titanium Cranks

Adblock test (Why?)

728x90x4

Source link

Continue Reading

Tech

City of Pointe-Claire signs a partnership agreement with Sport'Aide – Pointe-Claire

Published

 on


At the March 14th Council meeting, the City of Pointe-Claire signed a partnership agreement with Sport’Aide. The independent non-profit organization was created in 2014 by a team of 3 people concerned by the phenomenon of violence in sports.

The organization aims to offer support and guidance services to young athletes, as well as to the various actors in the Quebec sports world (parents, coaches, sports organizations, officials and volunteers) who may have witnessed violence against young athletes.

This agreement will allow the City and the para-municipal sport clubs, the Aquatic Club and the Canoe Kayak Club, to obtain personalized consulting services and to be assisted in the development and adaptation of sport safety policies and procedures.

300x250x1

“Pointe-Claire is the first city to sign an agreement with Sport’Aide, positioning it as a leader and further demonstrating our City’s commitment to maintaining a healthy, safe, harmonious and inclusive sports and recreation environment. I would like to thank our dynamic Sports and Recreation team and its director Mr. Gilles Girouard. This partnership demonstrates our proactivity and our concern for the quality of services offered to our community.” Said Tim Thomas, Mayor of Pointe-Claire

From left to right: Tim Thomas, Mayor of Pointe-Claire and Sylvain Croteau, Instigator and General Manager of Sport’Aide

Information : 514 630-1200, communications@pointe-claire.ca

Adblock test (Why?)

728x90x4

Source link

Continue Reading

Tech

B.C. parent launches class-action lawsuit against makers of Fortnite – Vancouver Sun

Published

 on


The proposed class-action lawsuit alleges the game is designed to be “as addictive as possible” for children.

300x250x1

Article content

A Vancouver parent has launched a proposed class-action lawsuit against the makers of Fortnite, saying the popular video game is designed to be “as addictive as possible” for children.

Advertisement 2

Article content

In the lawsuit filed in B.C. Supreme Court on Friday, the plaintiff identified only as A.B. says her son downloaded Fortnite in 2018 and “developed an adverse dependence on the game.”

Article content

The statement of claim says the game incorporates a number of intentional design choices such as offering rewards for completing challenges and making frequent updates, which encourages players to return repeatedly.

The statement says Fortnite creator Epic Games enriches itself by making content and customization options purchasable via an in-game currency, which are purchased with real cash.

The class-action lawsuit would still need approval from a judge and none of the allegations have been proven in court.

The plaintiff is seeking damages alleging the game breaches the B.C. Business Practices and Consumer Protection Act, as well as for “unjust enrichment” and medical expenses for psychological or physical injuries, among other claims.

Article content

Advertisement 3

Article content

“Video games have been around for decades, but Fortnite is unique in that the science and psychology of addiction and cognitive development are at the core of the game’s design,” the court statement says.

It describes the game as “predatory and exploitative,” given its popularity among minors.

In a written statement, Epic Games communications director Natalie Munoz said the company will “fight these inflammatory allegations.”

“These claims do not reflect how Fortnite operates and ignore all the ways parents can control their child’s experience through Epic’s Parental Controls,” she said.

As examples, Munoz said parental controls “enable guardians to supervise their child’s experience, including limiting purchases and receiving playtime reports.”

Advertisement 4

Article content

Social settings can also “default to the highest privacy option for minors” and Cabined Accounts “provide a tailored experience for younger players.”

Also, Munoz said the company has a daily spending limit for players under 13.

In the statement, A.B. says her son began playing Fortnite: Battle Royale on a Sony PlayStation 4 game console when he was nine years old. The boy, she said, soon began buying various Fortnite products while adding the game to different platforms at home, including on mobile phone and computer.

Since that time, A.B. says Epic Games “received payment for numerous charges” made to her credit card without her authorization. The statement says A.B.’s son spent “thousands of dollars” on in-game purchases.

Advertisement 5

Article content

“If Epic Games had warned A.B. that playing Fortnite could lead to psychological harm and financial expense, A.B. would not have allowed (her son) to download Fortnite,” the statement says.

The lawsuit, if approved by the court, would cover three classes of plaintiffs: an “Addiction Class” of people who suffered after developing a dependence on Fortnite, a “Minor Purchaser Class” that includes gamers who made purchases in the game while under the age of majority, and an “Accidental Purchaser Class” of users who mistakenly bought items due to the game’s design.

The lawsuit would cover all persons affected by Fortnite in Canada except Quebec, where Epic lost its attempt last month to appeal a court decision there to authorize a similar class-action suit.

Advertisement 6

Article content

In the Quebec class-action appeal attempt, Epic lawyers argued the claims that children were becoming addicted to Fortnite were “based purely on speculation,” and no scientific consensus exists on cyberaddiction.

Epic Games also said in the Quebec case that it was not given a chance to argue against the claim that minors who bought Fortnite’s in-game currency were taken advantage of.

Quebec Appeal Court Justice Guy Cournoyer said in his decision that Epic did not demonstrate any significant error on the lower court judge’s decision to authorize the class-action lawsuit in that case.

Epic said in documents made public in a separate legal battle with Apple in the United States that Fortnite made more than US$9 billion combined in 2018 and 2019.

The legal claim against the video maker in Quebec still needs to be argued in court.

  1. A judge has ruled 
out one of the major allegations against Electronic Arts — that it was engaged in illegal gambling

    B.C. judge says claim in video game ‘loot boxes’ class-action lawsuit may proceed

  2. Atomic Heart, from Mundfish, is one of the year's most controversial video games. 

    Comment: Is Atomic Heart a sloppy bit of pro-Russia propaganda against Ukraine?

Comments

Postmedia is committed to maintaining a lively but civil forum for discussion and encourage all readers to share their views on our articles. Comments may take up to an hour for moderation before appearing on the site. We ask you to keep your comments relevant and respectful. We have enabled email notifications—you will now receive an email if you receive a reply to your comment, there is an update to a comment thread you follow or if a user you follow comments. Visit our Community Guidelines for more information and details on how to adjust your email settings.

Join the Conversation

Advertisement 1

Adblock test (Why?)

728x90x4

Source link

Continue Reading

Trending