isNullOrUndefined(Object), isNull(Object) in the Util Module is deprecated in Angular 9. Alternative for isNullOrUndefined

 

Util module depreacted in angular. Here we are going to see the alternative for isNullOrUndefine, isNull, isUndefined.


import { isUndefinedisNullisNullOrUndefined } from 'util';

Alternative for util Modules:
export function isNullOrUndefined<T>(obj: T | null | undefined): obj is null | undefined {
    return typeof obj === 'undefined' || obj === null;
}

Comments

Popular posts from this blog

Your build is currently configured to use incompatible Java 21.0.3 and Gradle 8.2.1. Cannot sync the project.

Google Assistant Implementation in Android application with app actions