trialsOfType(type) {
            if (typeof this.timeline_parameters == "undefined") {
                if (this.trial_parameters.type == type) {
                    return this.trial_parameters;
                }
                else {
                    return [];
                }
            }
            else {
                var trials = [];
                for (var i = 0; i < this.timeline_parameters.timeline.length; i++) {
                    var t = this.timeline_parameters.timeline[i].trialsOfType(type);
                    trials = trials.concat(t);
                }
                return trials;
            }
        }
// get all the trials of a particular type

get all the trials of a particular type
get all the trials of a particular type
trialsOfType(type) {
            if (typeof this.timeline_parameters == "undefined") {
                if (this.trial_parameters.type == type) {
                    return this.trial_parameters;
                }
                else {
                    return [];
                }
            }
            else {
                var trials = [];
                for (var i = 0; i < this.timeline_parameters.timeline.length; i++) {
                    var t = this.timeline_parameters.timeline[i].trialsOfType(type);
                    trials = trials.concat(t);
                }
                return trials;
            }
        }
trialsOfType ( type ) { if ( typeof this . timeline_parameters == "undefined" ) { if ( this . trial_parameters . type == type ) { return this . trial_parameters ; } else { return [ ] ; } } else { var trials = [ ] ; for ( var i = 0 ; i < this . timeline_parameters . timeline . length ; i ++ ) { var t = this . timeline_parameters . timeline [ i ] . trialsOfType ( type ) ; trials = trials . concat ( t ) ; } return trials ; } }
get all the trials of a particular type
get all the trials of a particular type