run(timeline) {
            return __awaiter(this, void 0, void 0, function* () {
                if (typeof timeline === "undefined") {
                    console.error("No timeline declared in jsPsych.run. Cannot start experiment.");
                }
                if (timeline.length === 0) {
                    console.error("No trials have been added to the timeline (the timeline is an empty array). Cannot start experiment.");
                }
                // create experiment timeline
                this.timelineDescription = timeline;
                this.timeline = new TimelineNode(this, { timeline });
                yield this.prepareDom();
                yield this.checkExclusions(this.opts.exclusions);
                yield this.loadExtensions(this.opts.extensions);
                document.documentElement.setAttribute("jspsych", "present");
                this.startExperiment();
                yield this.finished;
            });
        }
/**
         * Starts an experiment using the provided timeline and returns a promise that is resolved when
         * the experiment is finished.
         *
         * @param timeline The timeline to be run
         */
Starts an experiment using the provided timeline and returns a promise that is resolved when
the experiment is finished.

@param timeline The timeline to be run
Starts an experiment using the provided timeline and returns a promise that is resolved when the experiment is finished . @param timeline The timeline to be run
run(timeline) {
            return __awaiter(this, void 0, void 0, function* () {
                if (typeof timeline === "undefined") {
                    console.error("No timeline declared in jsPsych.run. Cannot start experiment.");
                }
                if (timeline.length === 0) {
                    console.error("No trials have been added to the timeline (the timeline is an empty array). Cannot start experiment.");
                }
                this.timelineDescription = timeline;
                this.timeline = new TimelineNode(this, { timeline });
                yield this.prepareDom();
                yield this.checkExclusions(this.opts.exclusions);
                yield this.loadExtensions(this.opts.extensions);
                document.documentElement.setAttribute("jspsych", "present");
                this.startExperiment();
                yield this.finished;
            });
        }
run ( timeline ) { return __awaiter ( this , void 0 , void 0 , function * ( ) { if ( typeof timeline === "undefined" ) { console . error ( "No timeline declared in jsPsych.run. Cannot start experiment." ) ; } if ( timeline . length === 0 ) { console . error ( "No trials have been added to the timeline (the timeline is an empty array). Cannot start experiment." ) ; } this . timelineDescription = timeline ; this . timeline = new TimelineNode ( this , { timeline } ) ; yield this . prepareDom ( ) ; yield this . checkExclusions ( this . opts . exclusions ) ; yield this . loadExtensions ( this . opts . extensions ) ; document . documentElement . setAttribute ( "jspsych" , "present" ) ; this . startExperiment ( ) ; yield this . finished ; } ) ; }
Starts an experiment using the provided timeline and returns a promise that is resolved when
 the experiment is finished.
Starts an experiment using the provided timeline and returns a promise that is resolved when the experiment is finished .
// create experiment timeline
