DEV Community

Cover image for Ng-News: Episode 22/28
Rainer Hahnekamp
Rainer Hahnekamp

Posted on

2 1

Ng-News: Episode 22/28

Better type-safety with zod

In TypeScript, there are cases where we don't have a guarantee that the type we define is the one that is used during the runtime.

A typical example is the response of an HTTP request because the HttpClient doesn't verify that type. However, suppose you want that a verification still happens.

In that case, you should read Tim Deschryver's latest article, where he showcases zod, a validation library for TypeScript, and of course, how to integrate it into Angular.

Advanced TypeScript

If you have been working for some time with TypeScript, you will very likely be fascinated by its possibilities for type inference or utility types.

Especially NgRx, a state management library, shows the potential of TypeScript, if you really master it.

Mike Ryan, a member of the NgRx team, wrote an article where he explains step by step the techniques behind the createActionGroup function, which can actually be seen as a masterpiece.

ModuleFederation in Nx

ModuleFederation is a feature of webpack and is often used for MicroFrontends.

It is a perfect example of a community-driven project where especially Manfred Steyer did a lot of pioneering work.

Nx, an alternative to the Angular CLI, has now a feature where ModuleFederation is used to build only changed lazy loaded modules but not the rest of the application. This is obviously a massive boost in terms of build time. Colum Ferry wrote an article where he explained this feature in detail and how to apply it.

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay