DEV Community

Cover image for Ng-News 24/25: DomRef, TypeScript 5.5, Business/Render effect, State of JavaScript
ng-news for This is Angular

Posted on

4

Ng-News 24/25: DomRef, TypeScript 5.5, Business/Render effect, State of JavaScript

The days of ElementRef might be numbered. State of JavaScript revealed its results. TypeScript 5.5 brings inferred type predicates, a conceptional split into business, and rendering effects is on the table.

RFC: DOM Interaction

In a new RFC, the Angular team proposes replacing the ElementRef type with a new one: DomRef. ElementRef encapsulates the native DOM Element. Especially UI libraries, which require direct access to the DOM, heavily depend on it.

According to Jeremy Elbourn, the switch is necessary to achieve advanced hydration techniques like streaming or partial hydration.

The community received the RFC with certain reservations.

https://github.com/angular/angular/discussions/56498

State of JavaScript 2023

State of JavaScript, a survey with around 24,000 participants, released its results. In terms of usage, Vue took over Angular's second place. In the category of interest, Angular rose from 20% to 23%.

Liquid error: internal

TypeScript 5.5

TypeScript 5.5 was released, and it will be available in Angular 18.1.

We will get inferred type predicates. A function checking against a certain type and returning a boolean based on that is now automatically defined as a type predicate. That means whenever you use that function on a union type, TypeScript will reduce the amount of that union type according to your function.

Other new features are better checks for regular expressions and better type support whenever you access an object literal dynamically.

Business and Rendering Effects

When using effects, we usually want to control the Signals that the effect function tracks. In application development, it would make sense to define those Signals explicitly.

Alex Rickabaugh, Angular framework lead, explained on GitHub that the effect was designed for Rendering Effects, where implicit tracking is necessary. Explicit tracking would be a good fit for Business Effects.

Currently, the effect is not ready to support this in Angular Core.

https://github.com/angular/angular/issues/56155#issuecomment-2177202036

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay