Type ‘X| null’ is not assignable to type ‘boolean’ fix for async pipe in Angular

Luka Onikadze
2 min readApr 29, 2023

Async Pipe is a powerful tool to work with observables. It automatically subscribes to the stream, get’s us the data, and unsubscribes when the components are destroyed. There is one irritating point though; it returns T | null which means that we have to check on null before using it. This makes sense because observable might have no data yet so that…

--

--