validateSettings() {
        if (!this.hasChildren && this.loadChildren)
            throw "With load on demand enabled, you need to define hasChildren as part of the options";
        if (!this.loadChildren && this.hasChildren)
            throw "With load on demand enabled, you need to define loadChildren as part of the options";
        return this;
    }
/**
     * Validates whether the provided
     * settings are correct or not.
     * 
     * @returns {object} The tree object.
     */
Validates whether the provided
settings are correct or not.

@returns {object} The tree object.
Validates whether the provided settings are correct or not . @returns { object } The tree object .
validateSettings() {
        if (!this.hasChildren && this.loadChildren)
            throw "With load on demand enabled, you need to define hasChildren as part of the options";
        if (!this.loadChildren && this.hasChildren)
            throw "With load on demand enabled, you need to define loadChildren as part of the options";
        return this;
    }
validateSettings ( ) { if ( ! this . hasChildren && this . loadChildren ) throw "With load on demand enabled, you need to define hasChildren as part of the options" ; if ( ! this . loadChildren && this . hasChildren ) throw "With load on demand enabled, you need to define loadChildren as part of the options" ; return this ; }
Validates whether the provided
 settings are correct or not.
Validates whether the provided settings are correct or not .