mirror of
https://github.com/jspsych/jsPsych.git
synced 2025-05-11 16:18: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", () => {
|
||||
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";
|
||||
}).toThrowErrorMatchingInlineSnapshot(
|
||||
'"jsPsych.progressBar.progress must be a number between 0 and 1"'
|
||||
|
@ -3,17 +3,6 @@
|
||||
import { JsPsych } from "./JsPsych";
|
||||
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
|
||||
// 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: () => {
|
||||
this.addInteractionRecord(
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error - legacy code
|
||||
document.isFullScreen ||
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error - legacy code
|
||||
document.webkitIsFullScreen ||
|
||||
// @ts-expect-error
|
||||
// @ts-expect-error - legacy code
|
||||
document.mozIsFullScreen ||
|
||||
document.fullscreenElement
|
||||
? "fullscreenenter"
|
||||
|
Loading…
Reference in New Issue
Block a user