All files / src/utils enforce.ts

50% Statements 4/8
0% Branches 0/2
0% Functions 0/1
50% Lines 4/8
1 2 3 4 5 6 7 8 9 10 11 12  15x 15x   15x              
import isProblem from "./isProblem";
// TODO : replace with checkProblem
import conform from "./conform";
 
export default function enforce( clause, x ) {
  const r = conform( clause, x );
  if ( isProblem( r ) ) {
    throw r;
  }
  return undefined;
};