shared-utils.ts 233 B

1234567
  1. /**
  2. * Predicate with type guard, used to filter out null or undefined values
  3. * in a filter operation.
  4. */
  5. export function notNullOrUndefined<T>(val: T | undefined | null): val is T {
  6. return val !== undefined && val !== null;
  7. }