mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-12 08:38:11 +00:00
fix @typescript-eslint/ban-ts-comment issues
This commit is contained in:
parent
5eaff6cb28
commit
148409bf20
@ -30,7 +30,7 @@ describe("ProgressBar", () => {
|
|||||||
|
|
||||||
it("errors if an invalid progress value is provided", () => {
|
it("errors if an invalid progress value is provided", () => {
|
||||||
expect(() => {
|
expect(() => {
|
||||||
// @ts-expect-error
|
// @ts-expect-error - progressBar.progress is typed as a a number, but should handle the case of a string
|
||||||
progressBar.progress = "0";
|
progressBar.progress = "0";
|
||||||
}).toThrowErrorMatchingInlineSnapshot(
|
}).toThrowErrorMatchingInlineSnapshot(
|
||||||
'"jsPsych.progressBar.progress must be a number between 0 and 1"'
|
'"jsPsych.progressBar.progress must be a number between 0 and 1"'
|
||||||
|
@ -3,17 +3,6 @@
|
|||||||
import { JsPsych } from "./JsPsych";
|
import { JsPsych } from "./JsPsych";
|
||||||
import { MigrationError } from "./migration";
|
import { MigrationError } from "./migration";
|
||||||
|
|
||||||
// temporary patch for Safari
|
|
||||||
if (
|
|
||||||
typeof window !== "undefined" &&
|
|
||||||
Object.hasOwn(window, "webkitAudioContext") &&
|
|
||||||
!Object.hasOwn(window, "AudioContext")
|
|
||||||
) {
|
|
||||||
// @ts-expect-error
|
|
||||||
window.AudioContext = webkitAudioContext;
|
|
||||||
}
|
|
||||||
// end patch
|
|
||||||
|
|
||||||
// The following function provides a uniform interface to initialize jsPsych, no matter whether a
|
// The following function provides a uniform interface to initialize jsPsych, no matter whether a
|
||||||
// browser supports ES6 classes or not (and whether the ES6 build or the Babel build is used).
|
// browser supports ES6 classes or not (and whether the ES6 build or the Babel build is used).
|
||||||
/**
|
/**
|
||||||
|
@ -127,11 +127,11 @@ export class JsPsychData {
|
|||||||
},
|
},
|
||||||
fullscreenchange: () => {
|
fullscreenchange: () => {
|
||||||
this.addInteractionRecord(
|
this.addInteractionRecord(
|
||||||
// @ts-expect-error
|
// @ts-expect-error - legacy code
|
||||||
document.isFullScreen ||
|
document.isFullScreen ||
|
||||||
// @ts-expect-error
|
// @ts-expect-error - legacy code
|
||||||
document.webkitIsFullScreen ||
|
document.webkitIsFullScreen ||
|
||||||
// @ts-expect-error
|
// @ts-expect-error - legacy code
|
||||||
document.mozIsFullScreen ||
|
document.mozIsFullScreen ||
|
||||||
document.fullscreenElement
|
document.fullscreenElement
|
||||||
? "fullscreenenter"
|
? "fullscreenenter"
|
||||||
|
Loading…
Reference in New Issue
Block a user