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

66.66% Statements 2/3
0% Branches 0/1
100% Functions 1/1
66.66% Lines 2/3

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

1 2 3 4 5 63x 37x        
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`)
  }
}