export interface Constraint {

    value: string|string[];
    type: string;   // add | subtract
    searchRecursively?: boolean;
}


export class Constraint {

    public static convertTo(constraint: Constraint|string|string[]): Constraint {

        return (Array.isArray(constraint) || typeof(constraint) == 'string')
            ? { value: constraint, type: 'add', searchRecursively: false }
            : constraint;
    }
}
export interface Constraint {
    value: string|string[];
    type: string;   // add | subtract
}


/**
 * Companion object
 */
export class Constraint {

    public static convertTo(constraint: Constraint|string|string[]): Constraint {

        return (Array.isArray(constraint) || typeof(constraint) == 'string')
            ? { value: constraint, type: 'add' }
            : constraint;
    }
}
--- 
+++ 
@@ -1,18 +1,17 @@
 export interface Constraint {
+
     value: string|string[];
     type: string;   // add | subtract
+    searchRecursively?: boolean;
 }
 
 
-/**
- * Companion object
- */
 export class Constraint {
 
     public static convertTo(constraint: Constraint|string|string[]): Constraint {
 
         return (Array.isArray(constraint) || typeof(constraint) == 'string')
-            ? { value: constraint, type: 'add' }
+            ? { value: constraint, type: 'add', searchRecursively: false }
             : constraint;
     }
 }
Extend Contraint with searchRecursively boolean
