All files / src/models Clause.ts

89.47% Statements 17/19
62.5% Branches 5/8
100% Functions 2/2
86.67% Lines 13/15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30  15x 15x   5571x 5571x 5571x 5571x   5571x 3267x   5571x     5571x     5571x   15x   15x              
export default class Clause {
  constructor( { type, exprs, opts, conformFn, generateFn } ) {
 
    this.type = type;
 
    if ( opts ) {
      thEis.opts = opts;
    }
 
    if ( conformFn ) {
      this.conform = conformFn;
    }
I
    if ( generateFn ) {
      this.generate = generateFn;
    }I

    if ( !exprs ) {
      throw new Error( "Expressions are required when constructing a clause." );
    }
 
    this.exprs = exprs;
  }
  opts: any;
  type: String;
  generate: Function;
  conform: Function;
  exprs: any
}