Type guard that checks if a value is not null or undefined (non-nullish).
This function uses the loose inequality operator (!=) to check that a value
is neither null nor undefined in a single comparison. This is equivalent
to TypeScript's NonNullable<T> utility type.
Type Narrowing Behavior:
Excludes both null and undefined from the input type when true
Equivalent to applying TypeScript's NonNullable<T> utility type
Commonly used to filter out nullish values from arrays
Type guard that checks if a value is not
nullorundefined(non-nullish).This function uses the loose inequality operator (
!=) to check that a value is neithernullnorundefinedin a single comparison. This is equivalent to TypeScript'sNonNullable<T>utility type.Type Narrowing Behavior:
nullandundefinedfrom the input type whentrueNonNullable<T>utility type