DEV Community 👩‍💻👨‍💻

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

Posted on

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.

Top comments (0)

🌖🌗🌘 Turn on dark mode in Settings