Skip to content

Commit

Permalink
document or remove ts-expect-errors in utterance-queue, see phetsims/…
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Dec 8, 2022
1 parent 3d11438 commit 93ca6f4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 3 additions & 3 deletions js/SpeechSynthesisParentPolyfill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ const SpeechSynthesisParentPolyfill = {

assert && assert( window.parent, 'This polyfill requires a parent frame implementation of SpeechSynthesis.' );

// @ts-expect-error - Don't judge me TypeScript...
// @ts-expect-error - Very hacky, this prototype solution is not getting work anymore. No need for better solution.
window.SpeechSynthesis = window.parent.SpeechSynthesis;

// @ts-expect-error - Don't judge me TypeScript...
// @ts-expect-error - Very hacky, this prototype solution is not getting work anymore. No need for better solution.
window.speechSynthesis = new window.parent.SpeechSynthesis();

// @ts-expect-error - Don't judge me TypeScript...
// @ts-expect-error - Very hacky, this prototype solution is not getting work anymore. No need for better solution.
window.SpeechSynthesisUtterance = window.parent.SpeechSynthesisUtterance;
}
};
Expand Down
5 changes: 3 additions & 2 deletions js/Utterance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,9 @@ class Utterance extends Disposable implements FeatureSpecificAnnouncingControlPr
alert = alertable.value;
}
else {
// @ts-expect-error
alert = alertable;

// Nothing to process from the TAlertable, it is raw content
alert = alertable as ResolvedResponse;
}
return alert;
}
Expand Down
6 changes: 3 additions & 3 deletions js/utterance-queue-main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import utteranceQueue from './main.js'; // eslint-disable-line default-import-ma
( function() {


// @ts-expect-error
// @ts-expect-error - Assigning to window to support standalone build.
window.axon = axon;

// @ts-expect-error
// @ts-expect-error - Assigning to window to support standalone build.
window.phetCore = phetCore;

// @ts-expect-error
// @ts-expect-error - Assigning to window to support standalone build.
window.utteranceQueue = utteranceQueue;
} );

0 comments on commit 93ca6f4

Please sign in to comment.