All files / src/utils assert-is-truthy.ts

50% Statements 1/2
50% Branches 1/2
100% Functions 1/1
50% Lines 1/2

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6  50x        
export function assertIsTruthy<T>(value: T, name: string): asserts value is NonNullable<T> {
  Iif (!value) {
    throw new TypeError(`${name} must not be null or undefined`)
  }
}